AttestwireRule referenceBR-CL-03

BR-CL-03 Every amount’s currency must be an ISO 4217 currency code

noun · EN 16931 · fatal · BT-5

For a sample invoice, the library reports: Every monetary amount in the document carries a currencyID attribute, and it must be an ISO 4217 alphabetic code.

Business term
BT-5
Severity
fatal

The fix

Fix the currency code once, at the document level. There is no per-amount currency in this model, and EN 16931 does not permit mixing currencies inside one invoice: the only second currency it recognises is the VAT accounting currency (BT-6), which reports the VAT total again in the currency your tax authority requires and changes no other amount on the document.

Set vatAccountingCurrency together with taxAmountInAccountingCurrency (BT-111) if you need it — BR-53 requires both or neither.

A passing value

the shape this field expects
"currency": "EUR"

What the library returns

The full error returned by @attestwire/en16931. It includes the rule ID, affected field and suggested correction. Developers can use this object in their application:

TeachingError
{
  "rule": "BR-CL-03",
  "field": "BT-5",
  "severity": "fatal",
  "message": "Every monetary amount in the document carries a currencyID attribute, and it must be an ISO 4217 alphabetic code. This library writes the invoice currency code (BT-5) into all of them, so \"euro\" fails BR-CL-03 on each amount element — the line net amounts, the VAT breakdown amounts and all five document totals — as well as failing BR-CL-04 on the currency code itself.",
  "fix": "Fix the currency code once, at the document level. There is no per-amount currency in this model, and EN 16931 does not permit mixing currencies inside one invoice: the only second currency it recognises is the VAT accounting currency (BT-6), which reports the VAT total again in the currency your tax authority requires and changes no other amount on the document. Set vatAccountingCurrency together with taxAmountInAccountingCurrency (BT-111) if you need it — BR-53 requires both or neither.",
  "example": "\"currency\": \"EUR\"",
  "xpath": "/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount/@currencyID",
  "docsUrl": "https://attestwire.com/rules/BR-CL-03"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.