-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gross invoice example? #47
Comments
To be more specific, I tried to setup this invoice: 1 x test procuct 59 EUR net. This is the code: li = LineItem()
li.document.line_id = "1"
li.product.name = "TEST"
li.agreement.gross.amount = Decimal("59.00")
li.agreement.gross.basis_quantity = (Decimal("1.00"), "H87") # C62 == pieces
li.agreement.net.amount = Decimal("59.00")
li.agreement.net.basis_quantity = (Decimal("59.00"), "EUR")
li.delivery.billed_quantity = (Decimal("1.00"), "H87") # C62 == pieces
li.settlement.trade_tax.type_code = "VAT"
li.settlement.trade_tax.category_code = "S"
li.settlement.trade_tax.rate_applicable_percent = Decimal("19.00")
li.settlement.monetary_summation.total_amount = Decimal("59.00")
self.docZF.trade.items.add(li)
trade_tax = ApplicableTradeTax()
trade_tax.calculated_amount = Decimal("11.21")
trade_tax.basis_amount = Decimal("59.00")
trade_tax.type_code = "VAT"
trade_tax.category_code = "S"
#trade_tax.exemption_reason_code = 'VATEX-EU-AE'
trade_tax.rate_applicable_percent = Decimal("19.00")
self.docZF.trade.settlement.trade_tax.add(trade_tax)
self.docZF.trade.settlement.monetary_summation.line_total = Decimal("59.00")
self.docZF.trade.settlement.monetary_summation.charge_total = Decimal("0.00") # Gebühren
self.docZF.trade.settlement.monetary_summation.allowance_total = Decimal("0.00") # Zuschläge
self.docZF.trade.settlement.monetary_summation.tax_basis_total = Decimal("59.00")
self.docZF.trade.settlement.monetary_summation.tax_total = Decimal("11.21")
self.docZF.trade.settlement.monetary_summation.grand_total = Decimal("70.21")
self.docZF.trade.settlement.monetary_summation.due_amount = Decimal("70.21") Verifying the PDF, throws this error:
Valitool says:
So TaxTotalAmount is read as 0.00. Did I miss something or did I hit some bug? |
So the problem is that you are trying to do the impossible. ZUGFeRD 2 is modeled after EN16931. The German version of that norm is freely available at DIN… … and it only allows net invoices. Gross invoices are impossible to be EN16931 compliant. Yes, this sucks a lot. Someone has not thought this entire thing through and it has already given me sleepless nights. ZUGFeRD 2.3 EXTENDED introduces some flexibility on the rounding check, which is however in violation of current EN16931. |
Ouch! OK - thanks for the info. |
To fix "Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110)" add a currencyID to taxTotalAmount:
Reference: https://xeinkauf.de/app/uploads/2024/07/302-XRechnung-2024-06-20.pdf
|
That's not the issue at hand |
Sorry. I just read the error message and saw a solution. |
At first thanks for this great package.
Is it possible that someone translates the net invoice example to a gros invoice?
A simple invoice with 19% VAT, no tax exemption.
Otherwise its very hard to determine where to enter net values.
I am sure, this will prevent tons of validation errors and questions:
THANKS!
The text was updated successfully, but these errors were encountered: