VRBL-INV-AE-1p0-136
Basic Info
|
Rule
|
The value of the Charge Tax ID must be contained in UAE Tax codes [VRBL-CL-AE-TaxCodes] or be contained in UAE Tax codes [VRBL-CL-AE-TaxCodes] (prefixed by 'VRBL:AE:'). Allowed values: AE, E, N, O, S, Z or VRBL:AE:AE, VRBL:AE:E, VRBL:AE:N, VRBL:AE:O, VRBL:AE:S, VRBL:AE:Z. |
|
Context
|
/ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cac:TaxCategory
|
|
Pattern
|
vrbl-invoice-AE-1p0 |
|
Severity
|
fatal |
Used Template: CodeList
| Parameter |
|
Value |
| probe |
= |
cbc:ID
|
| codeList |
= |
$VRBL-CL-AE-TaxCodes or $VRBL-AE-Prefix:$VRBL-CL-AE-TaxCodes
|
| showValues |
= |
true
|
Implementation
not(boolean(cbc:ID))
or
(
(
not(
contains(
normalize-space(cbc:ID),
substring($VRBL-CL-AE-TaxCodes, 1, 1)
)
)
and
contains(
$VRBL-CL-AE-TaxCodes,
concat(
substring($VRBL-CL-AE-TaxCodes, 1, 1),
normalize-space(cbc:ID),
substring($VRBL-CL-AE-TaxCodes, 1, 1)
)
)
)
)
or
(
(
substring(normalize-space(cbc:ID), 1, string-length($VRBL-AE-Prefix)) = $VRBL-AE-Prefix
and
not(
contains(
substring-after(normalize-space(cbc:ID), $VRBL-AE-Prefix),
substring($VRBL-CL-AE-TaxCodes, 1, 1)
)
)
and
contains(
$VRBL-CL-AE-TaxCodes,
concat(
substring($VRBL-CL-AE-TaxCodes, 1, 1),
substring-after(normalize-space(cbc:ID), $VRBL-AE-Prefix),
substring($VRBL-CL-AE-TaxCodes, 1, 1)
)
)
)
)