e-Factura validator

All error codes › DK-R-004

DK-R-004 – , but the # is not allowed as first and last character

ErrorpeppolPeppol only

What the rule says

, but the # is not allowed as first and last character

How to fix it

Fill in or correct the fields named in the rule (the BT/BG codes tell you which). The test below shows exactly what is checked in the XML. Quickest: validate the invoice to get the exact location and, for amounts, the correct value.

Check your invoice for free

Paste the XML and see every error with the exact fix and the correct amounts.

Where it is checked in the XML

Context: cac:AllowanceCharge[$DKSupplierCountry = 'DK' and $DKCustomerCountry = 'DK']

Test (XPath):

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

Related rules