From e0cb89c8b3bf6eafb707e870c1b1644d90dbc367 Mon Sep 17 00:00:00 2001 From: DHOvergaard <84956460+DHOvergaard@users.noreply.github.com> Date: Mon, 17 Feb 2025 07:32:36 +0100 Subject: [PATCH] UAN-5061: DK-R-003 og DK-R-004 --- rules/sch/PEPPOL-EN16931-UBL.sch | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/rules/sch/PEPPOL-EN16931-UBL.sch b/rules/sch/PEPPOL-EN16931-UBL.sch index 95fe1d8..dc002d1 100644 --- a/rules/sch/PEPPOL-EN16931-UBL.sch +++ b/rules/sch/PEPPOL-EN16931-UBL.sch @@ -593,13 +593,31 @@ Last update: 2024 November release 3.0.18. When specifying non-VAT Taxes for Danish customers, Danish suppliers MUST use the AllowanceChargeReasonCode="ZZZ" and the 4-digit Tax category MUST be specified in AllowanceChargeReason - + test=" + not(cbc:AllowanceChargeReasonCode = 'ZZZ') or + ( + cbc:AllowanceChargeReason and + contains(cbc:AllowanceChargeReason, '#') and + not(starts-with(cbc:AllowanceChargeReason, '#')) and + not(ends-with(cbc:AllowanceChargeReason, '#')) and + (string-length(normalize-space(cbc:AllowanceChargeReason/text())) = 4) and + number(cbc:AllowanceChargeReason) >= 0 and + number(cbc:AllowanceChargeReason) <= 9999 + )" + flag="fatal"> + When AllowanceChargeReasonCode = "ZZZ": + - AllowanceChargeReason must be present. + - It must include a "#" character, but "#" cannot be the first or last character. + - It must be exactly 4 characters long and contain a number between 0000 and 9999. + + Values found: + - AllowanceChargeReasonCode: '' + - AllowanceChargeReason: '' + + + + +