AttestwireRule referenceBR-CL-04

BR-CL-04 The invoice currency must be an ISO 4217 currency code

noun · EN 16931 · fatal · BT-5

For a sample invoice, the library reports: The invoice currency code (BT-5) must be an ISO 4217 alphabetic code, but "euro" is not one. A three-letter shape is not enough — the schematron tests membership of the list, so "XYZ" and "EURO" both fail.

Business term
BT-5
Severity
fatal

The fix

Set currency to the ISO 4217 alpha-3 code in upper case. Common values: "EUR", "USD", "GBP", "CHF", "SEK", "DKK", "NOK", "PLN". Use the code, never the symbol or the name.

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-04",
  "field": "BT-5",
  "severity": "fatal",
  "message": "The invoice currency code (BT-5) must be an ISO 4217 alphabetic code, but \"euro\" is not one. A three-letter shape is not enough — the schematron tests membership of the list, so \"XYZ\" and \"EURO\" both fail.",
  "fix": "Set currency to the ISO 4217 alpha-3 code in upper case. Common values: \"EUR\", \"USD\", \"GBP\", \"CHF\", \"SEK\", \"DKK\", \"NOK\", \"PLN\". Use the code, never the symbol or the name.",
  "example": "\"currency\": \"EUR\"",
  "xpath": "/ubl:Invoice/cbc:DocumentCurrencyCode",
  "docsUrl": "https://attestwire.com/rules/BR-CL-04"
}

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