@cityssm/mpac-yetf
Version:
Parses the MPAC Year-End Tax File (YETF) into a usable object.
25 lines (19 loc) • 646 B
text/typescript
import type * as types from '../types'
export function formatPI(
recordPI: types.RawYetfRecordPI
): types.FormattedYetfRecordPI {
const formattedYetfRecordPI = recordPI as types.FormattedYetfRecordPI
formattedYetfRecordPI.phaseInStartingPointDollars = Number.parseInt(
formattedYetfRecordPI.phaseInStartingPoint,
10
)
formattedYetfRecordPI.phaseInValueDollars = Number.parseInt(
formattedYetfRecordPI.phaseInValue,
10
)
formattedYetfRecordPI.phaseInDestinationValueDollars = Number.parseInt(
formattedYetfRecordPI.phaseInDestinationValue,
10
)
return formattedYetfRecordPI
}