Peppol BIS Billing 3.0.21 · UBL

SE-R-013: The last digit of a Swedish organization number must be valid according to the Luhn…

Peppol BIS Billing 3.0.21 · UBL

fatalcountry

Original rule text

[SE-R-013]-The last digit of a Swedish organization number must be valid according to the Luhn algorithm.

Stored validation assertion
u:checkSEOrgnr(normalize-space(cbc:CompanyID))

SE-R-013 is a fatal rule in the country layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is rejected.

What this rule requires

In UBL, for the accounting supplier party legal entity where the country is Sweden (cbc:IdentificationCode = 'SE') and a cbc:CompanyID is present, the value must satisfy the Luhn check performed by u:checkSEOrgnr. This means the last digit of the organization number in cbc:CompanyID must be a valid Luhn check digit for the preceding digits.

How to fix

Correct cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID to a Swedish organization number with a valid Luhn check digit. Recalculate the check digit from the preceding digits or verify the number against a reliable source; keep the country code as SE if the supplier is Swedish.

Guidance on this rule. The original text above is authoritative.

Where to go next

SE-R-013 changed in 2 published Peppol BIS Billing UBL release comparisons:

Validate an invoice against these rules · All release changes