Skip to content

feat(billing): add tax_number to contract requests and Invoice#306

Draft
dashed wants to merge 2 commits into
mainfrom
aleal/feat/invoice-tax-number
Draft

feat(billing): add tax_number to contract requests and Invoice#306
dashed wants to merge 2 commits into
mainfrom
aleal/feat/invoice-tax-number

Conversation

@dashed

@dashed dashed commented Jun 11, 2026

Copy link
Copy Markdown
Member

Adds an optional tax_number field 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 Invoice lets 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 RolloverContractRequest and will be renumbered to 7 after this merges.

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.
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 11, 2026, 9:09 PM

@dashed dashed self-assigned this Jun 11, 2026
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