Maximum two decimal places for VAT total in accounting currency

Error BR-DEC-15 EN 16931

The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2.

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

If TaxCurrencyCode is present and TaxTotalAmount uses the same currency, the VAT amount has more than two decimal places. The rule does not apply when TaxCurrencyCode is absent.

What the rule means

The VAT amount in accounting currency is stated with no more than two decimal places. The currency match limits the check to the tax amount corresponding to the stated accounting currency.

Affected fields BT-111
Please state the VAT total in accounting currency with no more than two decimal places

The VAT amount in accounting currency has more than two decimal places. You can adjust the amount to the permitted decimal format.

What to do
  1. Check the TaxTotalAmount whose currencyID matches TaxCurrencyCode.
  2. Use no more than two decimal places for this VAT amount.
  3. Check the TaxTotalAmount property or the taxTotalInAccountingCurrency parameter of SetTaxCurrencyExchange(...).
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:TaxTotalAmount currencyID="EUR">12.345</ram:TaxTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
✓ Correct
<ram:TaxCurrencyCode>EUR</ram:TaxCurrencyCode>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:TaxTotalAmount currencyID="EUR">12.34</ram:TaxTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Check in FactoorSharp
  • FacturXInvoice.TaxTotalAmountInAccountingCurrency (BT-111)
  • FacturXInvoice.SetTaxCurrencyExchange(taxTotalInAccountingCurrency, accountingCurrency, conversionRate, conversionRateTimestamp) (taxTotalInAccountingCurrency: BT-111)
Technical details

The XPath check limits the decimal-place test to TaxTotalAmount whose currencyID matches TaxCurrencyCode. If TaxCurrencyCode is absent, the condition is satisfied.

Where the rule applies

The rule applies to TaxTotalAmount in SpecifiedTradeSettlementHeaderMonetarySummation when its currencyID matches TaxCurrencyCode.

Context (rule/@context)
//ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test expression (assert/@test)
not(ram:TaxTotalAmount) or ram:TaxTotalAmount[ ( @currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode and . = round(. * 100) div 100 ) or not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:TaxCurrencyCode) ]