PEPPOL-COMMON-R049
Swedish organization number MUST be stated in the correct format.
Why it fails
- A Swedish organisation number (scheme
0007) is not ten digits, has a hyphen, or fails its Luhn check digit.
How to fix it
Write it as ten digits without the hyphen: 5560360793, not 556036-0793.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element
cbc:EndpointID[@schemeID = '0007'] | cac:PartyIdentification/cbc:ID[@schemeID = '0007'] | cbc:CompanyID[@schemeID = '0007']
string-length(normalize-space()) = 10 and string(number(normalize-space())) != 'NaN' and u:checkSEOrgnr(normalize-space())
Checked with Peppol BIS Billing 3.0 Invoice, Peppol BIS Billing 3.0 Credit Note, Austria e-Rechnung.gv.at Peppol Invoice, Austria e-Rechnung.gv.at Peppol Credit Note
cbc:EndpointID[@schemeID = '0007'] | cac:PartyIdentification/cbc:ID[@schemeID = '0007'] | cbc:CompanyID[@schemeID = '0007']
string-length(normalize-space()) = 10 and string(number(normalize-space())) != 'NaN'
Checked with Norway EHF Reminder 3.0