Skip to content

Commit

Permalink
fix(TaxForm): handling of NFFE status (#1075)
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree authored Oct 30, 2024
1 parent 707c17a commit 7491f60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/pdf-lib-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const fillAllFieldsFromPDFFormWithPath = (pdfForm) => {
if (field.constructor.name === 'PDFTextField') {
const maxLength = field.getMaxLength();
field.setText(truncateMiddle(field.getName(), maxLength));
} else if (field.constructor.name === 'PDFCheckBox') {
console.debug(`Found checkbox: ${field.getName()}`);

Check warning on line 43 in lib/pdf-lib-utils.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
}
}
};
Expand Down
8 changes: 8 additions & 0 deletions lib/tax-forms/w8-ben-e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ const W8BenEFieldsDefinition: Partial<Record<keyof W8BenETaxFormValues, PDFField
formPath: 'topmostSubform[0].Page1[0].f1_2[0]',
transform: getCountryName,
},
nffeStatus: {
type: 'combo',
values: {
ActiveNFFE: 'topmostSubform[0].Page1[0].Col2[0].c1_3[13]',
PassiveNFFE: 'topmostSubform[0].Page1[0].Col2[0].c1_3[14]',
NonProfitOrganization: 'topmostSubform[0].Page1[0].Col2[0].c1_3[10]',
},
},
chapter3Status: {
type: 'combo',
values: {
Expand Down

0 comments on commit 7491f60

Please sign in to comment.