From: Tammo Ippen Date: Thu, 27 Nov 2025 19:46:37 +0000 (+0100) Subject: Add new fields line monetary summation (#92) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=665877b5a492510f35053dc8cd7dea5d55d8f82b;p=thirdparty%2Fpython-drafthorse.git Add new fields line monetary summation (#92) * Add new fields to SpecifiedTradeSettlementLineMonetarySummation (2.3) * add test values --- diff --git a/drafthorse/models/tradelines.py b/drafthorse/models/tradelines.py index dd2a921..e40dbf9 100644 --- a/drafthorse/models/tradelines.py +++ b/drafthorse/models/tradelines.py @@ -141,7 +141,39 @@ class LineDelivery(Element): class LineSummation(Element): total_amount = DecimalField( - NS_RAM, "LineTotalAmount", required=True, profile=COMFORT + NS_RAM, + "LineTotalAmount", + required=True, + profile=COMFORT, + _d="Nettobetrag der Rechnungsposition", + ) + charge_total = DecimalField( + NS_RAM, + "ChargeTotalAmount", + required=False, + profile=EXTENDED, + _d="Gesamtbetrag der Positionszuschläge", + ) + allowance_total = DecimalField( + NS_RAM, + "AllowanceTotalAmount", + required=False, + profile=EXTENDED, + _d="Gesamtbetrag der Positionsabschläge", + ) + tax_total = DecimalField( + NS_RAM, + "TaxTotalAmount", + required=False, + profile=EXTENDED, + _d="Gesamtbetrag der Positionssteuern", + ) + grand_total = DecimalField( + NS_RAM, + "GrandTotalAmount", + required=False, + profile=EXTENDED, + _d="Gesamtbruttobetrag der Position", ) total_allowance_charge = DecimalField( NS_RAM, diff --git a/tests/samples/zugferd_2p3_EXTENDED_Kostenrechnung.xml b/tests/samples/zugferd_2p3_EXTENDED_Kostenrechnung.xml index 548e543..d30f458 100644 --- a/tests/samples/zugferd_2p3_EXTENDED_Kostenrechnung.xml +++ b/tests/samples/zugferd_2p3_EXTENDED_Kostenrechnung.xml @@ -160,6 +160,8 @@ GLN 4304171000002 52.00 + 9.88 + 61.88 @@ -191,6 +193,8 @@ GLN 4304171000002 20.50 + 3.9 + 24.4 @@ -229,6 +233,8 @@ GLN 4304171000002 288.75 + 54.86 + 343.61 @@ -260,6 +266,8 @@ GLN 4304171000002 36.75 + 6.98 + 43.73 @@ -296,6 +304,8 @@ GLN 4304171000002 12.10 + 2.30 + 14.40