feat: extract due date and buyer reference, require it on XRechnung

- CII: due_date is read from the payment due date (BT-9) instead of the
  delivery terms description, normalized to YYYY-MM-DD
- new field buyer_reference (BT-10, the Leitweg-ID) for CII and UBL
- /validate accepts an optional profile; on XRECHNUNG_* profiles a
  missing buyer reference is a critical error (BR-DE-15)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 18:33:08 +01:00
co-authored by Claude Fable 5.2
parent 4ff994a299
commit fa9eaa4f82
8 changed files with 117 additions and 6 deletions
+1
View File
@@ -77,6 +77,7 @@ def test_fixture_sweep(filename: str) -> None:
xml_data=result.xml_data.model_dump(),
pdf_text=result.pdf_text,
checks=ALL_CHECKS,
profile=result.zugferd_profil,
)
validation = validate_invoice(request)
critical_fields = {error.field for error in validation.errors}