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:
@@ -6,6 +6,7 @@ tests/fixtures/real/, verify it contains no real-world data, and add a test
|
||||
here that locks in the correct behavior.
|
||||
"""
|
||||
|
||||
import re
|
||||
from io import BytesIO
|
||||
from pathlib import Path
|
||||
|
||||
@@ -51,6 +52,7 @@ class TestFcTaxNumberBasisQuantityInvoice:
|
||||
data = result.xml_data
|
||||
|
||||
assert data.invoice_number == "4711"
|
||||
assert re.fullmatch(r"\d{4}-\d{2}-\d{2}", data.due_date)
|
||||
assert data.supplier.tax_number == "1112223334444"
|
||||
assert data.supplier.vat_id is None
|
||||
assert data.supplier.email == "rechnung@beispielwerkstatt.example"
|
||||
|
||||
Reference in New Issue
Block a user