PEPPOL-COMMON-R040: GLN must have a valid format according to GS1 rules
Peppol BIS Billing 3.0.21 · UBL
Original rule text
[PEPPOL-COMMON-R040]-GLN must have a valid format according to GS1 rules.
matches(normalize-space(), '^[0-9]+$') and u:gln(normalize-space())PEPPOL-COMMON-R040 is a fatal rule in the format layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is rejected.
What this rule requires
In UBL, for each of cbc:EndpointID, cac:PartyIdentification/cbc:ID, or cbc:CompanyID where the attribute schemeID equals '0088', the element's text value, after ignoring surrounding whitespace, must consist only of digits (0-9) and must pass the rule's GLN format function u:gln(). The value must not be empty or only whitespace, and it cannot contain non-digit characters. If the value is all digits but u:gln() returns false, the rule also fails; the function enforces the GS1 GLN format as referenced by the rule.
How to fix
Set the value of the appropriate element (cbc:EndpointID, cac:PartyIdentification/cbc:ID, or cbc:CompanyID) with schemeID="0088" to a valid GLN that consists only of digits and passes the u:gln() check. Since the rule does not list the internal algorithm of u:gln(), verify the GLN against GS1 format requirements (typically including a correct check digit) as the validator expects. Replace or correct the current value without changing the schemeID.
Guidance on this rule. The original text above is authoritative.
Where to go next
PEPPOL-COMMON-R040 changed in 1 published Peppol BIS Billing UBL release comparison:
- PEPPOL-COMMON-R040 in 3.0.2 → 3.0.10: Severity raised
Validate an invoice against these rules · All release changes