Rule reference
One page per rule @attestwire/en16931 can raise. Each page
carries the exact TeachingError the library returns, so the
docsUrl in your logs lands on the explanation of the object
you are looking at.
58 rules, of several hundred in EN 16931 and its national restrictions. The payloads on these pages are not transcribed by hand — the site build executes the library and publishes what it returns, so a page cannot describe an error the code does not produce. Rules marked written up also carry the normative text, a worked example and a divergence note; the rest currently show the library's own message, fix, example and XPath.
EN 16931 core
| Rule | Term | Requirement |
|---|---|---|
BR-01 |
— |
Renumbered to BR-02 written up |
BR-02 |
BT-1 |
An invoice must have an invoice number written up |
BR-03 |
BT-2 |
An invoice must have an issue date (BT-2) |
BR-05 |
BT-5 |
An invoice must have a currency code (BT-5) from ISO 4217, but none was provided |
BR-06 |
BT-27 |
An invoice must contain the seller name (BT-27) — the name under which you are registered, not a brand or trading style, unless you also supply the registered name separately |
BR-07 |
BT-44 |
An invoice must contain the buyer name (BT-44) |
BR-08 |
BG-5 |
An invoice must contain the seller postal address (BG-5) |
BR-10 |
BG-8 |
An invoice must contain the buyer postal address (BG-8) |
BR-16 |
BG-25 |
An invoice must have at least one invoice line (BG-25) |
BR-21 |
BT-126 |
A line has no invoice line identifier (BT-126) |
BR-22 |
BT-129 |
A line has no invoiced quantity (BT-129) |
BR-23 |
BT-130 |
A line has no unit of measure code (BT-130) |
BR-25 |
BT-153 |
A line has no item name (BT-153) |
BR-26 |
BT-146 |
A line has no item net price (BT-146) |
BR-27 |
BT-146 |
A line (id "1") has a negative item net price (BT-146: -5) |
BR-61 |
BT-84 |
The payment means type code (BT-81) is "58", which means a credit transfer, so the payment account identifier (BT-84) must be present |
BR-62 |
BT-34 |
The seller electronic address (BT-34) must have a scheme identifier |
BR-63 |
BT-49 |
The buyer electronic address (BT-49) must have a scheme identifier |
VAT category rules
| Rule | Term | Requirement |
|---|---|---|
BR-AE-02 |
BT-48 / BT-47 |
Reverse charge requires the buyer to be identified written up |
BR-AE-05 |
BT-152 |
A line uses VAT category AE (Reverse charge), so the invoiced item VAT rate (BT-152) must be 0, but it is 19 |
BR-E-02 |
BT-31 / BT-32 |
A line uses VAT category E (Exempt from VAT), so the invoice must carry the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32), or a seller tax representative (BG-11) |
BR-E-05 |
BT-152 |
A line uses VAT category E (Exempt from VAT), so the invoiced item VAT rate (BT-152) must be 0, but it is 19 |
BR-E-10 |
BT-120 / BT-121 |
A VAT breakdown with category E (exempt from VAT) must have a VAT exemption reason code (BT-121) or reason text (BT-120) |
BR-G-02 |
BT-31 / BT-32 |
A line uses VAT category G (Export outside the EU), so the invoice must carry the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32), or a seller tax representative (BG-11) |
BR-G-05 |
BT-152 |
A line uses VAT category G (Export outside the EU), so the invoiced item VAT rate (BT-152) must be 0, but it is 19 |
BR-IC-02 |
BT-31 / BT-32 |
A line uses VAT category K (Intra-community supply), so the invoice must carry the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32), or a seller tax representative (BG-11) |
BR-IC-05 |
BT-152 |
A line uses VAT category K (Intra-community supply), so the invoiced item VAT rate (BT-152) must be 0, but it is 19 |
BR-IC-11 |
BT-72 |
An invoice with an intra-community supply (category K) must state the actual delivery date (BT-72) or an invoicing period (BG-14) |
BR-IC-12 |
BT-80 |
An invoice with an intra-community supply (category K) must state the deliver-to country code (BT-80) |
BR-O-02 |
BT-31 / BT-48 |
This invoice uses VAT category O (not subject to VAT), so it must not contain the seller VAT identifier (BT-31), the seller tax representative VAT identifier (BT-63) or the buyer VAT identifier (BT-48) |
BR-O-05 |
BT-152 |
A line uses VAT category O (not subject to VAT), so it must not carry an invoiced item VAT rate (BT-152) at all — not even 0 |
BR-S-02 |
BT-31 / BT-32 |
A line uses VAT category S (Standard rated), so the invoice must carry the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32), or a seller tax representative (BG-11) |
BR-S-05 |
BT-152 |
A line uses VAT category S (standard rated), so the invoiced item VAT rate (BT-152) must be greater than zero, but it is 0 |
BR-Z-02 |
BT-31 / BT-32 |
A line uses VAT category Z (Zero rated), so the invoice must carry the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32), or a seller tax representative (BG-11) |
BR-Z-05 |
BT-152 |
A line uses VAT category Z (Zero rated), so the invoiced item VAT rate (BT-152) must be 0, but it is 19 |
Conditions and calculations
| Rule | Term | Requirement |
|---|---|---|
BR-CO-09 |
BT-31 |
VAT identifiers must carry a country prefix written up |
BR-CO-10 |
BT-106 |
BR-CO-10 requires the sum of invoice line net amounts (BT-106) to equal Σ BT-131 |
BR-CO-13 |
BT-109 |
BR-CO-13 requires the invoice total without VAT (BT-109) to equal Σ BT-131 − document allowances (BT-107) + document charges (BT-108) |
BR-CO-14 |
BT-110 |
BR-CO-14 requires the invoice total VAT amount (BT-110) to equal Σ VAT category tax amounts (BT-117) |
BR-CO-15 |
BT-112 |
BR-CO-15 requires the invoice total with VAT (BT-112) to equal BT-109 + BT-110 |
BR-CO-16 |
BT-115 |
BR-CO-16 requires the amount due for payment (BT-115) to equal BT-112 − paid amount (BT-113) + rounding amount (BT-114) |
BR-CO-26 |
BT-30 / BT-31 |
In order for the buyer to automatically identify you, the invoice must carry at least one of the seller identifier (BT-29), seller legal registration identifier (BT-30) or seller VAT identifier (BT-31) |
XRechnung (German CIUS)
| Rule | Term | Requirement |
|---|---|---|
BR-DE-1 |
BG-16 |
XRechnung requires payment instructions (BG-16) with a payment means type code (BT-81) |
BR-DE-2 |
BG-6 |
XRechnung requires the seller contact group (BG-6), and requires it complete: contact point (BT-41), telephone number (BT-42) and email address (BT-43) are each individually mandatory under BR-DE-5, BR-DE-6 and BR-DE-7 |
BR-DE-3 |
BT-37 |
XRechnung requires the element "Seller city" (BT-37) |
BR-DE-4 |
BT-38 |
XRechnung requires the element "Seller post code" (BT-38) |
BR-DE-5 |
BT-41 |
XRechnung requires the element "Seller contact point" (BT-41) |
BR-DE-6 |
BT-42 |
XRechnung requires the element "Seller contact telephone number" (BT-42) |
BR-DE-7 |
BT-43 |
XRechnung requires the element "Seller contact email address" (BT-43) |
BR-DE-8 |
BT-52 |
XRechnung requires the element "Buyer city" (BT-52) |
BR-DE-9 |
BT-53 |
XRechnung requires the element "Buyer post code" (BT-53) |
BR-DE-15 |
BT-10 |
XRechnung requires a buyer reference written up |
BR-DE-16 |
BT-31 / BT-32 |
XRechnung requires that, when the tax codes S, Z, E, AE, K, G, L or M are used, at least one of the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32) or a seller tax representative party (BG-11) is present |
BR-DE-17 |
BT-3 |
XRechnung restricts the invoice type code (BT-3) to 326, 380, 381, 384, 389, 875, 876 and 877 from UNTDID 1001, but "999" was supplied |
BR-DE-27 |
BT-42 |
The seller contact telephone number (BT-42) should contain at least three digits, but "call us" contains 0 |
BR-DE-28 |
BT-43 |
The seller contact email address (BT-43) must contain exactly one "@", flanked by at least two characters on each side and by neither a space nor a dot, and must not begin or end with a dot |
Peppol BIS 3
| Rule | Term | Requirement |
|---|---|---|
PEPPOL-EN16931-R010 |
BT-49 |
The buyer electronic address (BT-49) must be provided |
PEPPOL-EN16931-R020 |
BT-34 |
The seller electronic address (BT-34) must be provided |
How to read these pages
- Rule ID
BR-*is EN 16931 core,BR-CO-*a cross-field condition,BR-DE-*the German XRechnung CIUS,BR-<category>-*a VAT-category rule,PEPPOL-*a Peppol BIS 3 restriction.- Term
- The business term the rule constrains:
BT-*a field,BG-*a group. - Severity
fatalmeans the document is non-conformant and will be rejected.warningmeans it is conformant but likely to cause a downstream problem — KoSIT's own warnings map to this.- Divergence
- Where our check is not the same assertion as the published rule. Read it: several of our input-level checks are deliberately stricter, and a few are narrower.