Skip to content

feat(templates): let a billed party print its own registration - #640

Merged
DemchaAV merged 1 commit into
feature/template-promotionfrom
feat/recipient-registration
Sep 1, 2026
Merged

DemchaAV merged 1 commit into
feature/template-promotionfrom
feat/recipient-registration

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Why

The next invoice bundle in the promotion queue prints the billed party's VAT number
under its address, beside a label. The supplier block can already say that —
InvoiceContactBlock.taxRegistrationLabel / taxRegistrationNumber — and
InvoiceRecipient cannot.

subline was the only spare field, and it is contractually the attention line that
sits above the address
— a department, a contact, a cost centre. A registration put
there renders in the wrong place, above the address instead of below it.

What

InvoiceRecipient carries registrationLabel and registrationNumber, mirroring the
pair the supplier block already has, plus hasRegistration() for the presets that draw
the row only when there is a number to draw — a label on its own is a heading over an
absence.

Both are plain strings, blank when absent. The six-argument constructor is kept
explicitly.

Tests

  • StructuredInvoiceCompatibilityTest gains three cases: the constructor that predates
    the registration leaves both fields blank and reports no registration, a recipient
    carries what it is given, and a label with no number still reports none. 14 cases green.
  • Full reactor gate green:
    ./mvnw -B -ntp clean verify -pl :graph-compose-core,:graph-compose-render-pdf,:graph-compose-render-docx,:graph-compose-render-pptx,:graph-compose-templates,:graph-compose-testing,:graph-compose-qa,:graph-compose-coverage -am
  • No preset draws the row yet, so no baseline moves.

A supplier could already state a tax registration through
InvoiceContactBlock.taxRegistrationLabel / taxRegistrationNumber, and the
party being billed could not — but most B2B invoices print the customer's
VAT or tax number too, under its address.

subline was the only spare field and it is contractually the attention
line that sits ABOVE the address, so a registration put there renders in
the wrong place. InvoiceRecipient now carries registrationLabel and
registrationNumber, mirroring the pair the supplier block already has,
with hasRegistration() for the presets that draw the row only when there
is a number to draw.

Both are plain strings, blank when absent, and the six-argument
constructor is kept explicitly, so existing calls compile and link
unchanged.
@DemchaAV
DemchaAV merged commit 5fb298f into feature/template-promotion Sep 1, 2026
12 checks passed
@DemchaAV
DemchaAV deleted the feat/recipient-registration branch September 1, 2026 07:27
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