AttestwireRule referenceBR-CL-05

BR-CL-05 The VAT accounting currency must be an ISO 4217 currency code

noun · EN 16931 · fatal · BT-6

For a sample invoice, the library reports: 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.

Business term
BT-6
Severity
fatal

The 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.

A passing value

the shape this field expects
"vatAccountingCurrency": "PLN", "taxAmountInAccountingCurrency": 1218.45

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-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 is always a UBL path. On a CII invoice, look for the matching CII field instead.