The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2.
When TaxCurrencyCode is specified and TaxTotalAmount is stated in that currency, the amount has more than two decimal places.
The VAT total in accounting currency may have no more than two decimal places.
TaxTotalAmount in accounting currency has more than two decimal places. If TaxCurrencyCode is specified, the amount's currency must match it and the amount may have no more than two decimal places.
- Check the value of
TaxTotalAmountin accounting currency and the specifiedTaxCurrencyCode. - Match the currency of
TaxTotalAmounttoTaxCurrencyCodeand limit the amount to no more than two decimal places. - Check
TaxTotalAmountInAccountingCurrencyand the calls toSetTaxTotalInAccountingCurrency(...)orSetTaxCurrencyExchange(...). - Generate the invoice again and validate it once more.
<rsm:CrossIndustryInvoice> <rsm:SupplyChainTradeTransaction> <ram:ApplicableHeaderTradeSettlement> <ram:TaxCurrencyCode>USD</ram:TaxCurrencyCode> <ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:TaxTotalAmount currencyID="USD">12.345</ram:TaxTotalAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation> </ram:ApplicableHeaderTradeSettlement> </rsm:SupplyChainTradeTransaction> </rsm:CrossIndustryInvoice>
<rsm:CrossIndustryInvoice> <rsm:SupplyChainTradeTransaction> <ram:ApplicableHeaderTradeSettlement> <ram:TaxCurrencyCode>USD</ram:TaxCurrencyCode> <ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:TaxTotalAmount currencyID="USD">12.34</ram:TaxTotalAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation> </ram:ApplicableHeaderTradeSettlement> </rsm:SupplyChainTradeTransaction> </rsm:CrossIndustryInvoice>
FacturXInvoice.TaxTotalAmountInAccountingCurrency(BT-111)FacturXInvoice.SetTaxTotalInAccountingCurrency(taxTotalInAccountingCurrency, accountingCurrency)(BT-111)FacturXInvoice.SetTaxCurrencyExchange(taxTotalInAccountingCurrency, accountingCurrency, conversionRate, conversionRateTimestamp)(taxTotalInAccountingCurrency: BT-111)
Technical details
The XPath allows a missing TaxTotalAmount or a missing TaxCurrencyCode. If TaxCurrencyCode is present, the currencyID of TaxTotalAmount must match it and the amount must be rounded to two decimal places.
The rule applies to TaxTotalAmount in SpecifiedTradeSettlementHeaderMonetarySummation. It checks the amount against TaxCurrencyCode when the accounting currency is specified.
rule/@context)assert/@test)