Rule reference

BR-CL-04 The invoice currency code (BT-5) must be an ISO 4217 alphabetic code, but "euro" is not one

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.

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:

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 locates the element in the generated UBL document, which is where a KoSIT or Peppol validator will report the same problem.

A passing value

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

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.

Arrived from a stack trace? The docsUrl on every error links straight here. Something wrong on this page — tell us.