Skip to content

feat(templates): give an invoice line the mark its design draws - #636

Merged
DemchaAV merged 1 commit into
feature/template-promotionfrom
feat/invoice-line-mark
Sep 1, 2026
Merged

feat(templates): give an invoice line the mark its design draws#636
DemchaAV merged 1 commit into
feature/template-promotionfrom
feat/invoice-line-mark

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The next invoice bundle in the promotion queue opens every service line with a glyph —
a card for a billing line, a shield for fraud screening, a globe for a hosted service.
InvoiceServiceLines.Line had nowhere to say which one, and deriving it from the
description would have been guesswork dressed as a feature.

What

Line carries icon, a plain string blank when absent, exactly as CvEntry.icon
already works on the CV side: the token means something only to the preset that
packages it, and a preset that draws no marks ignores it. It costs the layout nothing
where nothing is set.

Both constructors that predate it — the one before the per-line tax rate and the one
before the mark — are kept explicitly.

Tests

  • StructuredInvoiceCompatibilityTest gains three cases beside the existing one: the
    pre-tax-rate constructor leaves both the rate and the mark blank, the pre-mark
    constructor keeps the rate and leaves the mark blank, a line carries the mark it is
    given, and a null mark normalizes to blank like the fields beside it. 11 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 a line mark yet, so no baseline moves.

A design that opens each service line with a glyph — a card for a
billing line, a shield for fraud screening, a globe for a hosted service
— had nowhere to say which one, and deriving it from the description
would have been guesswork dressed as a feature.

InvoiceServiceLines.Line now carries icon, a plain string blank when
absent, exactly as CvEntry.icon already works on the CV side: the token
means something only to the preset that packages it, and a preset that
draws no marks ignores it. It costs the layout nothing where nothing is
set.

Both constructors that predate it — the one before the per-line tax rate
and the one before the mark — are kept explicitly, so existing calls
compile and link unchanged and every line built through them still
carries no mark.
@DemchaAV
DemchaAV merged commit c6577f7 into feature/template-promotion Sep 1, 2026
12 checks passed
@DemchaAV
DemchaAV deleted the feat/invoice-line-mark branch September 1, 2026 06:11
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