The currency indication of "Third party payment amount" BT-DEX-002 shall correspond to BT-5 ("Invoice currency code").
The currencyID attribute of cbc:PaidAmount does not match the value of cbc:DocumentCurrencyCode. The third-party payment amount is therefore stated in a different currency from the invoice.
The third-party payment must be stated in the invoice currency so that its amount can be compared with the invoice amounts.
The currency on the third-party payment amount in cbc:PaidAmount differs from the invoice currency in cbc:DocumentCurrencyCode. Make the two currency values match.
- Check the value of
cbc:DocumentCurrencyCode. - Compare it with the
currencyIDattribute ofcbc:PaidAmountincac:PrepaidPayment. - Check whether the invoice currency is set in
Currency. - Regenerate the invoice and check it again.
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode> <cac:PrepaidPayment> <cbc:PaidAmount currencyID="USD">25.00</cbc:PaidAmount> </cac:PrepaidPayment>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode> <cac:PrepaidPayment> <cbc:PaidAmount currencyID="EUR">25.00</cbc:PaidAmount> </cac:PrepaidPayment>
FacturXInvoice.Currency(Invoice currency: BT-5)FacturXInvoice.SetTaxCurrencyExchange(taxTotalInAccountingCurrency, accountingCurrency, conversionRate, conversionRateTimestamp)(conversionRate: BT-5)
Technical details
The XPath directly compares the currencyID attribute of cbc:PaidAmount with the text value of the parent-level cbc:DocumentCurrencyCode.
The rule compares the currency on cbc:PaidAmount within cac:PrepaidPayment with the invoice currency in cbc:DocumentCurrencyCode.
rule/@context)assert/@test)