All rules · pint-eu · error

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

No plain-English explanation yet. We write these in order of how often they actually trip people up, and this one has not come up much. Tell us what tripped you up and it moves to the front of the queue.

The official rule

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

Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.

Schematron test

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, '#')))) )                                )      )

Applied to nodes matching cac:AllowanceCharge[$DKSupplierCountry = 'DK' and $DKCustomerCountry = 'DK']

Rule-pack versions

Rule-packLayerSeverityApplies to
pint-eu-1.1.1pint-euerrorbilling/creditnote, billing/invoice

Check your own invoice

Paste your XML and see every rule that fires, not just this one. Free, no sign-up, and we never store the document.

Open the validator