Limit decimals in the VAT total

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

When TaxTotalAmount is in the invoice currency specified by InvoiceCurrencyCode, the amount has more than two decimal places. This rule does not check decimal places when it is in another currency.

What the rule means

The VAT total in the invoice currency may have no more than two decimal places.

Affected fields BT-110
Please limit the decimal places in the VAT total in invoice currency

TaxTotalAmount is expressed in the invoice currency and has more than two decimal places. You can adjust the amount to no more than two decimal places.

What to do
  1. Compare TaxTotalAmount with the invoice currency in InvoiceCurrencyCode.
  2. If the currencies match, limit TaxTotalAmount to no more than two decimal places.
  3. Check the TaxTotalAmount property.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<rsm:CrossIndustryInvoice>
  <rsm:SupplyChainTradeTransaction>
    <ram:ApplicableHeaderTradeSettlement>
      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
        <ram:TaxTotalAmount currencyID="EUR">12.345</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">12.34</ram:TaxTotalAmount>
      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
    </ram:ApplicableHeaderTradeSettlement>
  </rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>
Check in FactoorSharp
  • FacturXInvoice.TaxTotalAmount (BT-110)
Technical details

The XPath accepts a missing TaxTotalAmount. If currencyID matches InvoiceCurrencyCode, the amount must equal its value rounded to two decimal places; this check does not apply when the currencies differ.

Where the rule applies

The rule applies to TaxTotalAmount in SpecifiedTradeSettlementHeaderMonetarySummation. It checks decimal places when the amount currency matches the invoice currency in 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) ]