feat(billing): add tax_number to contract requests and Invoice#306
Draft
dashed wants to merge 2 commits into
Draft
feat(billing): add tax_number to contract requests and Invoice#306dashed wants to merge 2 commits into
dashed wants to merge 2 commits into
Conversation
The invoicer already resolves the customer's tax number for tax calculation but the contract service has no way to receive or expose it, so it is never persisted on the invoice. Carry it on CreateContractRequest and RolloverContractRequest so the invoice snapshot includes the tax number used at invoicing time, and expose it on Invoice so receipts render the persisted value instead of re-deriving from current billing details. Regenerates the Rust bindings.
|
The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).
|
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.
Adds an optional
tax_numberfield to three contract-service messages so the customer's tax registration number is carried into and persisted on the invoice it produces.CreateContractRequest.tax_number(field 7)RolloverContractRequest.tax_number(field 6)Invoice.tax_number(field 10)Why
Today the invoicer resolves the customer's tax number to compute tax, but the contract service has no field to receive it, so the value is sent to the tax provider and then discarded. Carrying it on the create and rollover requests lets the contract service snapshot the tax number that was in effect at invoicing time, and exposing it on
Invoicelets receipts render that persisted value (and re-derive reverse-charge treatment) instead of re-reading the customer's current billing details, which may have changed since.The Rust bindings are regenerated; the Python bindings are generated at build time and not committed.
Note
The in-flight tax_pending PR #287 currently claims field 6 on
RolloverContractRequestand will be renumbered to 7 after this merges.