Attestwire › Rule reference › ATW-LEITWEG-ID-INVALID

ATW-LEITWEG-ID-INVALID A Leitweg-ID must have the form and check digits its specification sets

noun · Attestwire · warning · BT-10

For a sample invoice, the library reports: The buyer reference (BT-10) "04011000-1234512345-07" has the form of a Leitweg-ID, but its check digits do not match.

Business term
BT-10
Severity
warning

The fix

Copy the Leitweg-ID again from where the buyer gave it to you, such as the order, the contract or the authority's invoicing instructions, rather than retyping it. Do not recompute the check digits to silence this warning: a Leitweg-ID whose digits match but that nobody holds is just as undeliverable.

A passing value

the shape this field expects
"buyerReference": "04011000-1234512345-06"

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": "ATW-LEITWEG-ID-INVALID",
  "field": "BT-10",
  "severity": "warning",
  "message": "The buyer reference (BT-10) \"04011000-1234512345-07\" has the form of a Leitweg-ID, but its check digits do not match. The last two digits are computed from everything before them with ISO/IEC 7064 MOD 97-10, as the Leitweg-ID format specification 2.0.2 prescribes (section 2.4), so a digit or letter before them is almost certainly mistyped or swapped. The Leitweg-ID is how the German public sector addresses an e-invoice: the receiving portal routes on it, so an invoice carrying one that was issued to nobody cannot reach the authority it is meant for. This is a warning of this library, not a rule of EN 16931 or of a CIUS, so it never makes the invoice invalid. It applies only because the reference has the form of a Leitweg-ID: if it is another kind of reference your buyer gave you, the warning does not apply.",
  "fix": "Copy the Leitweg-ID again from where the buyer gave it to you, such as the order, the contract or the authority's invoicing instructions, rather than retyping it. Do not recompute the check digits to silence this warning: a Leitweg-ID whose digits match but that nobody holds is just as undeliverable.",
  "example": "\"buyerReference\": \"04011000-1234512345-06\"",
  "xpath": "/ubl:Invoice/cbc:BuyerReference",
  "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.