Use no more than two decimal places for the total VAT amount

Error BR-DEC-13 EN 16931

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

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:TaxTotalAmount has more than two decimal places even though its currencyID matches ram:InvoiceCurrencyCode. This decimal-place check does not apply when the currency differs from the invoice currency or when ram:TaxTotalAmount is absent.

What the rule means

The VAT amount in the invoice currency may have no more than two decimal places. The rule applies this limit only when the amount’s currency matches the invoice currency.

Affected fields BT-110
Please limit the decimal places of the VAT amount

The VAT amount in the invoice currency has more than two decimal places. Limit the decimal places of ram:TaxTotalAmount to no more than two.

What to do
  1. Check ram:TaxTotalAmount and its currencyID against ram:InvoiceCurrencyCode.
  2. When the currencies match, limit the decimal places of ram:TaxTotalAmount to no more than two.
  3. Check the value of TaxTotalAmount.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<rsm:CrossIndustryInvoice>
  <rsm:SupplyChainTradeTransaction>
    <ram:ApplicableHeaderTradeSettlement>
      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
        <ram:TaxTotalAmount currencyID="EUR">1.234</ram:TaxTotalAmount>
      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
    </ram:ApplicableHeaderTradeSettlement>
  </rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>
✓ Correct
<rsm:CrossIndustryInvoice>
  <rsm:SupplyChainTradeTransaction>
    <ram:ApplicableHeaderTradeSettlement>
      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
        <ram:TaxTotalAmount currencyID="EUR">1.23</ram:TaxTotalAmount>
      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
    </ram:ApplicableHeaderTradeSettlement>
  </rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>
Check in FactoorSharp
  • FacturXInvoice.TaxTotalAmount (BT-110)
Good to know

When currencyID differs from the invoice currency, this test does not check the two-decimal-place limit.

Technical details

The test passes if ram:TaxTotalAmount is absent, if its currency matches the invoice currency and its value is unchanged when rounded to two decimal places, or if its currency differs from the invoice currency.

Where the rule applies

The rule checks ram:TaxTotalAmount in ram:SpecifiedTradeSettlementHeaderMonetarySummation and compares its currencyID with ram:InvoiceCurrencyCode.

Context (rule/@context)
//ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test expression (assert/@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) ]