Rules
Basic Info
|
Rule
|
The value of the Document Level Charge Reason Code must be contained in Charge Reason Code (Philippines Extension) [VRBL-CL-PH-ChargeReasonCode-Extension] (prefixed by 'VRBL:PH:'). |
|
Context
|
/ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cbc:AllowanceChargeReasonCode
|
|
Pattern
|
vrbl-invoice-ph-1p0 |
|
Severity
|
fatal |
Used Template: CodeList
| Parameter |
|
Value |
| probe |
= |
.
|
| codeList |
= |
$VRBL-PH-Prefix:$VRBL-CL-PH-ChargeReasonCode-Extension
|
Implementation
not(boolean(.))
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-ChargeReasonCode-Extension, 1, 1)
)
)
and
contains(
$VRBL-CL-PH-ChargeReasonCode-Extension,
concat(
substring($VRBL-CL-PH-ChargeReasonCode-Extension, 1, 1),
substring-after(normalize-space(.), $VRBL-PH-Prefix),
substring($VRBL-CL-PH-ChargeReasonCode-Extension, 1, 1)
)
)
)
)