Peppol BIS Billing 3.0.21 · UBL

DK-R-004: When specifying non-VAT Taxes for Danish customers, Danish suppliers MUST use the…

Peppol BIS Billing 3.0.21 · UBL

fatalcountry

Original rule text

[DK-R-004]-When specifying non-VAT Taxes for Danish customers, Danish suppliers MUST use the AllowanceChargeReasonCode="ZZZ" and MUST be specified in AllowanceChargeReason; Either as the 4-digit Tax category or must include a #, but the # is not allowed as first and last character

Stored validation assertion
not((cbc:AllowanceChargeReasonCode = 'ZZZ')       and not(((string-length(normalize-space(cbc:AllowanceChargeReason/text())) = 4)         and (number(cbc:AllowanceChargeReason) >= 0)         and (number(cbc:AllowanceChargeReason) <= 9999)) or         (((cbc:AllowanceChargeReason and contains(cbc:AllowanceChargeReason, '#')                                   and not(starts-with(cbc:AllowanceChargeReason, '#'))                                   and not(ends-with(cbc:AllowanceChargeReason, '#')))) )                                )      )

DK-R-004 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

For a cac:AllowanceCharge where both $DKSupplierCountry and $DKCustomerCountry are 'DK' (Danish supplier and customer), if cbc:AllowanceChargeReasonCode is 'ZZZ' then cbc:AllowanceChargeReason must satisfy one of two alternatives: either its normalized text is exactly 4 characters long and represents a number from 0 to 9999, or it contains a '#' that is neither the first nor the last character. The rule is fatal; any cac:AllowanceCharge with reason code 'ZZZ' and a reason that satisfies neither alternative fails validation.

How to fix

Set cbc:AllowanceChargeReason to either a 4-digit numeric value (e.g. 1234, 0012) or a value containing '#' not at start or end (e.g. A#B), and ensure cbc:AllowanceChargeReasonCode is ZZZ. If using the 4-digit form, the value must have exactly four characters after ignoring surrounding whitespace and convert to a number between 0 and 9999. If using the '#' form, put at least one character before and after the '#'. If you are not trying to specify non-VAT tax, use a different reason code.

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

Where to go next

DK-R-004 changed in 1 published Peppol BIS Billing UBL release comparison:

Validate an invoice against these rules · All release changes