BR-CL-03 Every monetary amount in the document carries a currencyID attribute, and it must be an ISO 4217 alphabetic code
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.
This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.
- Business term
BT-5- Severity
fatal
What the library returns
The exact object in result.errors when this rule fires.
Generated by running @attestwire/en16931, not transcribed:
{
"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 locates the element in the generated UBL document,
which is where a KoSIT or Peppol validator will report the same problem.
A passing value
"currency": "EUR"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.