Repository navigation
feat(invoice)!: structured supply period, carried as Swico S1 /31/ - #11
Merged
Merged
Conversation
`supply` was free text ("Juli 2026"), so the QR-bill's billing information
could not carry the VAT date and the printed period was whatever was typed.
It is now a required, structured field: a day (2026-07-15), a calendar
month (2026-07), or a period ({from: 2026-07-01, to: 2026-09-30}). It is
printed in the invoice's locale (a month still reads "Juli 2026") and goes
into the S1 element as /31/ (YYMMDD, or YYMMDDYYMMDD for a period), dropped
right after /32/ when the 140-character budget runs out.
Also adds a payload test for an IBAN + SCOR QR-bill, which was untested:
every field (unstructured message, full S1) is carried, including a
21-character reference.
BREAKING CHANGE: invoice files must set `supply` to a date, a YYYY-MM
month or a {from, to} period. Free text is refused at load, and the error
names the replacement (`supply: Juli 2026` → `supply: 2026-07`).
Claude-Session: https://claude.ai/code/session_01WhmPdqQaLz2gA83BXhn9XP
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.
What
supplyis now structured and required: a day, aYYYY-MMmonth, or a{from, to}period (SupplyPeriodininvoice/model.py).Juli 2026,15.07.2026,1. Juli – 30. Sept. 2026); the ledger draft narration is unchanged for the month form./31/; dropped right after/32/when the 140-character budget runs out.2026-07shorthand.Breaking
Existing invoice files with free-text
supplyfail at load. The error names the fix (supply: Juli 2026→supply: 2026-07), recognising month names in every invoice language.Checks
make checkgreen (369 passed). Sample invoices render; the domestic one printsJuli 2026and its payload ends in…/30/267359056/31/260701260731/32/8.1/40/0:30.🤖 Generated with Claude Code
https://claude.ai/code/session_01WhmPdqQaLz2gA83BXhn9XP