BR-CL-05 The VAT accounting currency code (BT-6) must be an ISO 4217 alphabetic code, but "SEKK" is not one
The VAT accounting currency code (BT-6) must be an ISO 4217 alphabetic code, but "SEKK" is not one. It is the same list BT-5 is drawn from and it is checked just as strictly — three letters is a shape, not a membership. This code is also load-bearing beyond its own field: the generator writes it into the @currencyID of the second cac:TaxTotal, and BR-53 and BR-DEC-15 both find BT-111 by matching that attribute against this value, so a code that fails here takes those two rules down with it.
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-6- 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-05",
"field": "BT-6",
"severity": "fatal",
"message": "The VAT accounting currency code (BT-6) must be an ISO 4217 alphabetic code, but \"SEKK\" is not one. It is the same list BT-5 is drawn from and it is checked just as strictly — three letters is a shape, not a membership. This code is also load-bearing beyond its own field: the generator writes it into the @currencyID of the second cac:TaxTotal, and BR-53 and BR-DEC-15 both find BT-111 by matching that attribute against this value, so a code that fails here takes those two rules down with it.",
"fix": "Set vatAccountingCurrency to the ISO 4217 alpha-3 code in upper case — \"PLN\", \"SEK\", \"DKK\", \"CZK\", \"HUF\", \"RON\". Use the code, never the symbol or the name, and only set the field at all when VAT is accounted for in a currency other than the invoice currency.",
"example": "\"vatAccountingCurrency\": \"PLN\", \"taxAmountInAccountingCurrency\": 1218.45",
"xpath": "/ubl:Invoice/cbc:TaxCurrencyCode",
"docsUrl": "https://attestwire.com/rules/BR-CL-05"
}
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
"vatAccountingCurrency": "PLN", "taxAmountInAccountingCurrency": 1218.45The fix
Set vatAccountingCurrency to the ISO 4217 alpha-3 code in upper case — "PLN", "SEK", "DKK", "CZK", "HUF", "RON". Use the code, never the symbol or the name, and only set the field at all when VAT is accounted for in a currency other than the invoice currency.