PEPPOL-EN16931-R053
The rule sets below word this rule differently; each wording is shown with its rule set.
Why it fails
- There is no
cac:TaxTotalwithcac:TaxSubtotal, or there are several: one per VAT rate instead of one with a subtotal per rate.
How to fix it
Write a single cac:TaxTotal with the total VAT amount and one cac:TaxSubtotal for each VAT category and rate.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
Only one tax total with tax subtotals MUST be provided.
ubl-creditnote:CreditNote | ubl-invoice:Invoice
count(cac:TaxTotal[cac:TaxSubtotal]) = 1
Checked with Peppol BIS Billing 3.0 Invoice, Peppol BIS Billing 3.0 Credit Note
No more than one tax total amount must be provided where currency id equals document currency code.
ram:ApplicableHeaderTradeSettlement
count(ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID = $documentCurrencyCode]) <=1
Checked with XRechnung 3.0 Invoice (CII)