feat(payment_terms): Snapshot payment_term on invoice level - #6195
Open
D1353L wants to merge 3 commits into
Open
feat(payment_terms): Snapshot payment_term on invoice level#6195D1353L wants to merge 3 commits into
D1353L wants to merge 3 commits into
Conversation
D1353L
force-pushed
the
feat-payment-terms-snapshot-term-invoice
branch
4 times, most recently
from
August 21, 2026 14:53
2f3d208 to
bc93890
Compare
D1353L
force-pushed
the
feat-payment-terms-snapshot-term-invoice
branch
4 times, most recently
from
August 25, 2026 14:21
83dc1cf to
d46dc76
Compare
D1353L
force-pushed
the
feat-payment-terms-snapshot-term-invoice
branch
2 times, most recently
from
August 25, 2026 14:31
f082abf to
ddf834b
Compare
D1353L
marked this pull request as ready for review
August 26, 2026 10:02
Contributor
|
Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green HOLD — invoices can snapshot the wrong billing entity's payment term.
|
D1353L
force-pushed
the
feat-payment-terms-snapshot-term-invoice
branch
from
August 26, 2026 16:24
e828347 to
1603bb5
Compare
Contributor
|
Automated pre-review (advisory, not a required check) — verdict: HOLD · CI green HOLD — invoice generation and previews can snapshot a payment term from the wrong billing entity.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Before this change, invoice due dates were computed from
customer.applicable_net_payment_termat every refresh. A later term change on the customer or the billing entity could silently move the due date of open drafts. To support structured terms (end_of_month, day_of_month, due_on_receipt), each invoice must keep the exact term that was used when it was created.Description
payment_termjsonb, thepayment_term_source(customer or billing entity), and the integernet_payment_termalias.payment_due_dateis computed from the snapshotted term.UpdateInvoicePaymentDueDateServiceclasses are removed.Invoice#snapshotted_payment_termbuilds a net term from their own integer alias.BillingEntity#net_payment_termon the model level.Stack created with GitHub Stacks CLI • Give Feedback 💬