Attestwire › Rule reference › ATW-SIRET-INVALID
ATW-SIRET-INVALID A SIRET must be fourteen digits with valid check digits
noun · Attestwire · warning · BT-46
For a sample invoice, the library reports: The buyer identifier (BT-46) is "12345678200011" under scheme 0009, which makes it a SIRET: the fourteen digits that identify one establishment of a French company, its SIREN followed by a five-digit establishment number.
- Business term
BT-46- Severity
warning
The fix
Take the SIRET from the SIRENE register or from the party it identifies, rather than retyping it, and write buyer.identifier as fourteen digits without spaces.
A passing value
"identifier": { "schemeId": "0009", "value": "12345678200010" }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:
{
"rule": "ATW-SIRET-INVALID",
"field": "BT-46",
"severity": "warning",
"message": "The buyer identifier (BT-46) is \"12345678200011\" under scheme 0009, which makes it a SIRET: the fourteen digits that identify one establishment of a French company, its SIREN followed by a five-digit establishment number. This one fails the check: all fourteen digits must pass the Luhn check, and so must the SIREN they begin with. (La Poste's establishments, SIREN 356000000, are the one exception INSEE makes: their digits add up to a multiple of 5 instead, and that is accepted.) French invoicing platforms, Chorus Pro among them, find the company or establishment by this number, so an invoice carrying one that does not exist cannot be matched to it. This is a warning of this library, not a rule of EN 16931 or of a CIUS, so it never makes the invoice invalid.",
"fix": "Take the SIRET from the SIRENE register or from the party it identifies, rather than retyping it, and write buyer.identifier as fourteen digits without spaces.",
"example": "\"identifier\": { \"schemeId\": \"0009\", \"value\": \"12345678200010\" }",
"xpath": "/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID",
"docsUrl": "https://github.com/attestwire/en16931#not-implemented-yet"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.