Rules
Basic Info
|
Rule
|
The value of the Document Level Allowance Reason Code must be contained in Allowance Reason Code (subset of UNCL 5189) [VRBL-CL-PH-AllowanceReasonCode-UNCL5189] or be contained in Allowance Reason Code (Philippines Extension) [VRBL-CL-PH-AllowanceReasonCode-Extension] (prefixed by 'VRBL:PH:'). |
|
Context
|
/ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']/cbc:AllowanceChargeReasonCode
|
|
Pattern
|
vrbl-invoice-ph-1p0 |
|
Severity
|
fatal |
Used Template: CodeList
| Parameter |
|
Value |
| probe |
= |
.
|
| codeList |
= |
$VRBL-CL-PH-AllowanceReasonCode-UNCL5189 or $VRBL-PH-Prefix:$VRBL-CL-PH-AllowanceReasonCode-Extension
|
Implementation
not(boolean(.))
or
(
(
not(
contains(
normalize-space(.),
substring($VRBL-CL-PH-AllowanceReasonCode-UNCL5189, 1, 1)
)
)
and
contains(
$VRBL-CL-PH-AllowanceReasonCode-UNCL5189,
concat(
substring($VRBL-CL-PH-AllowanceReasonCode-UNCL5189, 1, 1),
normalize-space(.),
substring($VRBL-CL-PH-AllowanceReasonCode-UNCL5189, 1, 1)
)
)
)
)
or
(
(
substring(normalize-space(.), 1, string-length($VRBL-PH-Prefix)) = $VRBL-PH-Prefix
and
not(
contains(
substring-after(normalize-space(.), $VRBL-PH-Prefix),
substring($VRBL-CL-PH-AllowanceReasonCode-Extension, 1, 1)
)
)
and
contains(
$VRBL-CL-PH-AllowanceReasonCode-Extension,
concat(
substring($VRBL-CL-PH-AllowanceReasonCode-Extension, 1, 1),
substring-after(normalize-space(.), $VRBL-PH-Prefix),
substring($VRBL-CL-PH-AllowanceReasonCode-Extension, 1, 1)
)
)
)
)