BR-DEC-13

The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2.

error: the document is invalid Peppol documentation ↗

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.

Context
/ubl:Invoice | /cn:CreditNote
Test
(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode] and (string-length(substring-after(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode],'.'))<=2)) or (not(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode]))

Checked with EN 16931 Invoice (UBL), EN 16931 Credit Note (UBL), Croatia eRačun Invoice (UBL), Croatia eRačun Credit Note (UBL)

Context
//ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test
not(ram:TaxTotalAmount) or ram:TaxTotalAmount[(@currencyID = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode and xs:decimal(.) = round(xs:decimal(.) * 100) div 100) or not(@currencyID = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode)]

Checked with EN 16931 Invoice (CII)

Context
//ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test
not(ram:TaxTotalAmount) or ram:TaxTotalAmount[(@currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode and . = round(. * 100) div 100) or not (@currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode)]

Checked with France e-invoice (CII), XRechnung 3.0 Invoice (CII)