Message

The last digit of a Swedish organization number must be valid according to the Luhn algorithm.

Context
//cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity[../cac:PostalAddress/cac:Country/cbc:IdentificationCode = 'SE' and cbc:CompanyID]
Test
u:checkSEOrgnr(normalize-space(cbc:CompanyID))
Usage
/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyLegalEntity / cbc:CompanyID
/ ubl:CreditNote / cac:AccountingSupplierParty / cac:Party / cac:PartyLegalEntity / cbc:CompanyID