Rules
Basic Info
|
Rule
|
The value of the Shipment Freight Allowance Charge Reason Code must be contained in Allowance Charge Reason Code [VRBL-CL-MX-AllowanceChargeReasonCode] (prefixed by 'VRBL:MX:'). Allowed values: VRBL:MX:AppraisalFee. |
|
Context
|
/ubl:DespatchAdvice/cac:Shipment/cac:FreightAllowanceCharge/cbc:AllowanceChargeReasonCode
|
|
Pattern
|
vrbl-despatchadvice-mx-1p0 |
|
Severity
|
fatal |
Used Template: CodeList
| Parameter |
|
Value |
| probe |
= |
.
|
| codeList |
= |
$VRBL-MX-Prefix:$VRBL-CL-MX-AllowanceChargeReasonCode
|
| showValues |
= |
true
|
Implementation
not(boolean(.))
or
(
(
substring(normalize-space(.), 1, string-length($VRBL-MX-Prefix)) = $VRBL-MX-Prefix
and
not(
contains(
substring-after(normalize-space(.), $VRBL-MX-Prefix),
substring($VRBL-CL-MX-AllowanceChargeReasonCode, 1, 1)
)
)
and
contains(
$VRBL-CL-MX-AllowanceChargeReasonCode,
concat(
substring($VRBL-CL-MX-AllowanceChargeReasonCode, 1, 1),
substring-after(normalize-space(.), $VRBL-MX-Prefix),
substring($VRBL-CL-MX-AllowanceChargeReasonCode, 1, 1)
)
)
)
)