UNPKG

@cityssm/mpac-yetf

Version:

Parses the MPAC Year-End Tax File (YETF) into a usable object.

37 lines (23 loc) 1.02 kB
import * as ggLookups from '../lookups/ggLookups.js' import type * as types from '../types.js' export function formatGG( recordGG: types.RawYetfRecordGG ): types.FormattedYetfRecordGG { const formattedYetfRecordGG = recordGG as types.FormattedYetfRecordGG // Identifier formattedYetfRecordGG.identifierName = ggLookups.identifierNames[formattedYetfRecordGG.identifier] // Occupancy Status formattedYetfRecordGG.occupancyStatusName = ggLookups.occupancyStatusNames[formattedYetfRecordGG.occupancyStatus] // School Support formattedYetfRecordGG.schoolSupportName = ggLookups.schoolSupportNames[formattedYetfRecordGG.schoolSupport] // Residency Code formattedYetfRecordGG.residencyCodeDescription = ggLookups.residencyCodeDescriptions[formattedYetfRecordGG.residencyCode] // Month of Birth formattedYetfRecordGG.monthOfBirthName = ggLookups.monthOfBirthNames[formattedYetfRecordGG.monthOfBirth] return formattedYetfRecordGG }