Only one tax total amount must be provided where currency id equals tax currency code, if tax currency code (BT-6) is provided.
When ram:TaxCurrencyCode is provided, exactly one ram:TaxTotalAmount must have a currencyID different from the document currency. If ram:TaxCurrencyCode is absent, no such amount in another currency may be present.
A provided VAT accounting currency requires exactly one corresponding VAT amount in that currency. If no VAT accounting currency is provided, no VAT amount in a different currency is expected.
The VAT accounting currency and VAT amount information do not match. When a VAT accounting currency is provided, exactly one VAT amount in a currency different from the invoice currency must be present.
- Check
TaxCurrencyfor the VAT accounting currency provided. - Check the
SetTaxCurrencyExchange(...)call and the accounting currency it sets. - Make sure exactly one
ram:TaxTotalAmounthas acurrencyIDdifferent from the invoice currency. - Generate the invoice again and validate it.
<ram:ApplicableHeaderTradeSettlement> <ram:TaxCurrencyCode>USD</ram:TaxCurrencyCode> <ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:TaxTotalAmount currencyID="EUR">10.00</ram:TaxTotalAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation> </ram:ApplicableHeaderTradeSettlement>
<ram:ApplicableHeaderTradeSettlement> <ram:TaxCurrencyCode>USD</ram:TaxCurrencyCode> <ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:TaxTotalAmount currencyID="EUR">10.00</ram:TaxTotalAmount> <ram:TaxTotalAmount currencyID="USD">11.00</ram:TaxTotalAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation> </ram:ApplicableHeaderTradeSettlement>
FacturXInvoice.TaxCurrency(BT-6)FacturXInvoice.SetTaxCurrencyExchange(taxTotalInAccountingCurrency, accountingCurrency, conversionRate, conversionRateTimestamp)(accountingCurrency: BT-6)
Technical details
The test compares the count of ram:TaxTotalAmount elements with a currencyID different from $documentCurrencyCode to 1 when ram:TaxCurrencyCode is present, and to 0 otherwise.
The rule applies to ram:TaxTotalAmount in the VAT breakdown of the settlement header summary and to ram:TaxCurrencyCode in ram:ApplicableHeaderTradeSettlement.
rule/@context)assert/@test)