Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(TaxForms/W9): Sign box position #1098

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/tax-forms/w9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
type: 'combo',
values: {
Individual: 'topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[0]',
C_Corporation: 'topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[1]',

Check warning on line 18 in lib/tax-forms/w9.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'C_Corporation' is not in camel case
S_Corporation: 'topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[2]',

Check warning on line 19 in lib/tax-forms/w9.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'S_Corporation' is not in camel case
Partnership: 'topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[3]',
TrustEstate: 'topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[4]',
LimitedLiabilityCompany: 'topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[5]',
Expand Down Expand Up @@ -81,12 +81,14 @@

fillPDFFormFromValues(form, values, W9FieldsDefinition, font);

const signBoxY = 200;

// W9 don't have a dedicated date field, so we add it manually
const firstPage = pdfDoc.getPage(0);
firstPage.drawText(moment().format('MM/DD/YYYY'), { x: 420, y: 235, size: 10, font });
firstPage.drawText(moment().format('MM/DD/YYYY'), { x: 420, y: signBoxY, size: 10, font });

// Add date & signature
if (values.isSigned) {
await addSignature(pdfDoc, signerFullName, { x: 140, y: 235, fallbackFont: font });
await addSignature(pdfDoc, signerFullName, { x: 140, y: signBoxY, fallbackFont: font });
}
};
Loading