ZUGFeRD/ZUV

invoice incorrect when optional element <TaxCurrencyCode> is present

Closed this issue · 2 comments

taxcurrencycode is 0..1 but if it's 1, the validation will fail
in https://www.zugferd-community.net/forum/viewtopic.php?f=4&t=66
this zip contains a "invalid" sample file and a "fixed" one
zi.zip. I checked against the ZF2.1 TA that TaxCurrencyCode is 0..1

I can confirm this possible misbehavior.
When adding those lines in xml
<ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode> <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>

the validator throws the error

If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided.

even though the value is provided in the xml further below
<ram:TaxTotalAmount currencyID="EUR">133.65</ram:TaxTotalAmount>

Deleting the TaxCurrencyCode line in the xml file makes the xml valid again. But it should be valid in the first place in my understanding.

After a litle research: this is also in the CEN schematrons as CII-SR-314 and apparent the TaxCurrencyCode is (only?) to be specified if it differs from the invoice currency code.