Skip to content

feat(payment_terms): PDF and e-invoice updates - #6200

Open
D1353L wants to merge 2 commits into
feat-payment-terms-snapshot-term-invoicefrom
feat-payment-terms-templates-changes
Open

feat(payment_terms): PDF and e-invoice updates#6200
D1353L wants to merge 2 commits into
feat-payment-terms-snapshot-term-invoicefrom
feat-payment-terms-templates-changes

Conversation

@D1353L

@D1353L D1353L commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Context

Invoice PDFs and E-invoice files should display the new payment_term label. The legacy payment term sentence should be removed from the dunning email (payment request).

Labels:

term_type 🇬🇧 en
due_on_receipt Due on receipt
net Payment due within {N} days
end_of_month Due at end of month
net_end_of_month Due {N} days after end of month
days_end_of_month Due {N} days, end of month
day_of_month Due on the {D} of the following month

Day-of-month labels are offset-dependent:

month_offset 🇬🇧 en
0 Due on the {D} of this month
1 Due on the {D} of the following month
N ≥ 2 Due on the {D}, {N} months after invoice

Description

  • Added a helper for building payment term labels.
  • Updated PDF templates and E-invoice serializer to use the new helper.
  • Legacy payment term sentence removed from the payment_request email.
  • Added i18n locales.

Stack created with GitHub Stacks CLIGive Feedback 💬

@D1353L
D1353L force-pushed the feat-payment-terms-templates-changes branch 2 times, most recently from 49619b2 to 0ba0f9c Compare August 21, 2026 16:27
@D1353L
D1353L force-pushed the feat-payment-terms-templates-changes branch 2 times, most recently from 316c90d to aa8f1ea Compare August 21, 2026 16:53
@D1353L
D1353L force-pushed the feat-payment-terms-templates-changes branch from aa8f1ea to 52b543c Compare August 25, 2026 13:09
@D1353L
D1353L force-pushed the feat-payment-terms-templates-changes branch from 52b543c to fd55e60 Compare August 25, 2026 14:21
@D1353L
D1353L force-pushed the feat-payment-terms-templates-changes branch from fd55e60 to c8ce82b Compare August 25, 2026 14:27
@D1353L
D1353L force-pushed the feat-payment-terms-templates-changes branch 2 times, most recently from ad8bc9f to d2c5852 Compare August 25, 2026 14:37
@D1353L
D1353L force-pushed the feat-payment-terms-templates-changes branch from d2c5852 to b6c46d0 Compare August 26, 2026 16:24
@D1353L
D1353L marked this pull request as ready for review August 26, 2026 16:56
@lago-claude-ai-agent

Copy link
Copy Markdown
Contributor

Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green

HOLD — the new shared labels can be grammatically wrong or contradict the invoice due date.

  • Day-based terms are not pluralized, so days: 1 renders strings such as “Payment due within 1 days” in English and other pluralizing locales. Use locale plural forms and add singular coverage.
  • A day_of_month term with month_offset: 0 rolls a past configured day into the following month, but #label always says “this month.” Make the wording accurate for the roll-forward case and test it against the calculated due date.

@D1353L
D1353L force-pushed the feat-payment-terms-templates-changes branch from 83f0a3b to 9d33f9c Compare August 26, 2026 20:30
@lago-claude-ai-agent

Copy link
Copy Markdown
Contributor

Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green

HOLD — day_of_month descriptions can disagree with the invoice's actual due date.

  • PaymentTerm#label chooses the configured day and “this/following month” from month_offset alone, but due_date_for rolls a past offset-0 day into the next month and clamps invalid dates. For example, an invoice issued July 15 with day 10/offset 0 is due August 10 but renders “Due on the 10 of this month”; day 31 can likewise render for February while the due date is February 28/29. Derive wording from the effective due date (or use wording that remains accurate) and cover roll-forward and clamping cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant