SE-R-001: For Swedish suppliers, Swedish VAT-numbers must consist of 14 characters.
This rule (SE-R-001) is a Swedish national extension to EN 16931, implemented in Peppol BIS Billing 3.0. It validates that when the supplier's country (BT-40, represented by cac:PostalAddress/cac:Country/cbc:IdentificationCode) is 'SE' and the supplier's VAT identifier (BT-31, represented by cac:PartyTaxScheme[cac:TaxScheme/cbc:ID='VAT']/cbc:CompanyID) starts with 'SE', the VAT number must be exactly 14 characters long. The context XPath selects the supplier party (cac:AccountingSupplierParty/cac:Party) where the country code is 'SE' and the VAT company ID begins with 'SE'. The assertion test (though not explicitly provided in the raw XPath) checks that the length of the CompanyID is 14. This rule ensures compliance with Swedish VAT format: 'SE' followed by 10 digits and a check digit (total 14 characters). The severity is fatal, meaning the invoice must be rejected if violated.
1. Locate the supplier's VAT identifier in the UBL invoice: it is the cbc:CompanyID within cac:PartyTaxScheme where cac:TaxScheme/cbc:ID is 'VAT', inside cac:AccountingSupplierParty/cac:Party. 2. Ensure the value starts with 'SE' (country code) followed by exactly 12 digits (total 14 characters). The Swedish VAT number format is 'SE' + 10-digit organization number + '01' (or sometimes '02' for certain entities). For example, 'SE123456789012' is valid. 3. If the current value is shorter or longer, correct it to the proper 14-character format. Verify the organization number and check digit according to Swedish VAT rules. 4. If the supplier is not Swedish, ensure that the country code in cac:PostalAddress/cac:Country/cbc:IdentificationCode is not 'SE' or that the VAT number does not start with 'SE' to avoid triggering this rule. 5. After correction, validate the invoice against the Peppol BIS Billing 3.0 Schematron to ensure compliance.
Missing <cbc:CustomizationID> or value does not declare EN 16931 CIUS compliance.
fix: Insert <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>.
Missing <cbc:EndpointID schemeID="..."> inside <cac:AccountingSupplierParty>/<cac:Party>.
fix: Add <cbc:EndpointID schemeID="9930">DE123456789</cbc:EndpointID> as the first child of Seller <cac:Party>.
No <cbc:BuyerReference> (BT-10) found. Mandatory in XRechnung 3.0 (BR-DE-15) and required in Peppol BIS 3.0 (PEPPOL-EN16931-R003) when OrderReference is absent.
fix: Insert <cbc:BuyerReference>991-12849-74</cbc:BuyerReference> in the document header.
If both supplier and customer are located in Germany, an invoice shall contain information on "PAYMENT INSTRUCTIONS" (BG-16).
If both supplier and customer are located in Germany, the group "SELLER CONTACT" (BG-6) shall be provided.
If both supplier and customer are located in Germany, the element "Buyer reference" (BT-10) shall be provided.
If both supplier and customer are located in Germany, and if one of the VAT codes S, Z, E, AE, K, G, L, or M is used, an invoice shall contain at least one of the following elements: "Seller VAT identifier" (BT-31) or "Seller tax registration identifier" (BT-32) or "SELLER TAX REPRESENTATIVE PARTY" (BG-11).
If both supplier and customer are located in Germany, the element "Invoice type code" (BT-3) should only contain the following values from code list UNTDID 1001: 326 (Partial invoice), 380 (Commercial invoice), 384 (Corrected invoice), 389 (Self-billed invoice), 381 (Credit note), 875 (Partial construction invoice), 876 (Partial final construction invoice), 877 (Final construction invoice).