Match the currency of the third-party payment amount

Error BR-DEX-14 XRechnung

The currency indication of "Third party payment amount" BT-DEX-002 shall correspond to BT-5 ("Invoice currency code").

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

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.

What the rule means

The third-party payment must be stated in the invoice currency so that its amount can be compared with the invoice amounts.

Affected fields BT-5
Please use the invoice currency for the third-party payment amount

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.

What to do
  1. Check the value of cbc:DocumentCurrencyCode.
  2. Compare it with the currencyID attribute of cbc:PaidAmount in cac:PrepaidPayment.
  3. Check whether the invoice currency is set in Currency.
  4. Regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cac:PrepaidPayment>
  <cbc:PaidAmount currencyID="USD">25.00</cbc:PaidAmount>
</cac:PrepaidPayment>
✓ Correct
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cac:PrepaidPayment>
  <cbc:PaidAmount currencyID="EUR">25.00</cbc:PaidAmount>
</cac:PrepaidPayment>
Check in FactoorSharp
  • 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.

Where the rule applies

The rule compares the currency on cbc:PaidAmount within cac:PrepaidPayment with the invoice currency in cbc:DocumentCurrencyCode.

Original message from the Schematron
Die Währungsangabe von "Third party payment amount" BT-DEX-002 muss BT-5 ("Invoice currency code") entsprechen.
Context (rule/@context)
/ubl:Invoice/cac:PrepaidPayment[$isExtension]
Test expression (assert/@test)
cbc:PaidAmount/@currencyID = parent::node()/cbc:DocumentCurrencyCode