Skip to content

Commit 7491f60

Browse files
authored
fix(TaxForm): handling of NFFE status (#1075)
1 parent 707c17a commit 7491f60

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/pdf-lib-utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export const fillAllFieldsFromPDFFormWithPath = (pdfForm) => {
3939
if (field.constructor.name === 'PDFTextField') {
4040
const maxLength = field.getMaxLength();
4141
field.setText(truncateMiddle(field.getName(), maxLength));
42+
} else if (field.constructor.name === 'PDFCheckBox') {
43+
console.debug(`Found checkbox: ${field.getName()}`);
4244
}
4345
}
4446
};

lib/tax-forms/w8-ben-e.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ const W8BenEFieldsDefinition: Partial<Record<keyof W8BenETaxFormValues, PDFField
1313
formPath: 'topmostSubform[0].Page1[0].f1_2[0]',
1414
transform: getCountryName,
1515
},
16+
nffeStatus: {
17+
type: 'combo',
18+
values: {
19+
ActiveNFFE: 'topmostSubform[0].Page1[0].Col2[0].c1_3[13]',
20+
PassiveNFFE: 'topmostSubform[0].Page1[0].Col2[0].c1_3[14]',
21+
NonProfitOrganization: 'topmostSubform[0].Page1[0].Col2[0].c1_3[10]',
22+
},
23+
},
1624
chapter3Status: {
1725
type: 'combo',
1826
values: {

0 commit comments

Comments
 (0)