All rules · en16931 · error
BR-CL-04
The invoice currency code must be a valid ISO 4217 three-letter code.
Reviewed
Why this rule exists
Currency is matched against a code list. A name or a symbol cannot be looked up, so the document is rejected.
Why it usually happens
- Emitting "Dirham" or "AED " with trailing whitespace
- Lower-casing the code somewhere in the pipeline
How to fix it
Uppercase and trim currency codes at the boundary, and validate against ISO 4217 before serializing.
Wrong
<cbc:DocumentCurrencyCode>aed</cbc:DocumentCurrencyCode>
Right
<cbc:DocumentCurrencyCode>AED</cbc:DocumentCurrencyCode>
The official rule
Invoice currency code MUST be coded using ISO code list 4217 alpha-3
Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.
Schematron test
((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD AOA ARS AUD AWG AZN BAM BBD BDT BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XCG XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))Applied to nodes matching cbc:DocumentCurrencyCode
Rule-pack versions
| Rule-pack | Layer | Severity | Applies to |
|---|---|---|---|
| pint-eu-1.1.1 | en16931 | error | billing/creditnote, billing/invoice |
Related rules
Check your own invoice
Paste your XML and see every rule that fires, not just this one. Free, no sign-up, and we never store the document.
Open the validator