VRBL-INV-AE-1p0-135
Basic Info
|
Rule
|
The Invoice Type Code is '81' or '480',the value of the Charge Tax ID must be contained in UAE Tax exempted codes [VRBL-CL-AE-TaxExemptionCodes] or be contained in UAE Tax exempted codes [VRBL-CL-AE-TaxExemptionCodes] (prefixed by 'VRBL:AE:'). Allowed values: E, O, Z or VRBL:AE:E, VRBL:AE:O, 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-TaxExemptionCodes or $VRBL-AE-Prefix:$VRBL-CL-AE-TaxExemptionCodes
|
| showValues |
= |
true
|
Implementation
(
not(/ubl:Invoice/cbc:InvoiceTypeCode = '480' or /ubl:Invoice/cbc:InvoiceTypeCode = '81')
)
or
(
not(boolean(cbc:ID))
or
(
(
not(
contains(
normalize-space(cbc:ID),
substring($VRBL-CL-AE-TaxExemptionCodes, 1, 1)
)
)
and
contains(
$VRBL-CL-AE-TaxExemptionCodes,
concat(
substring($VRBL-CL-AE-TaxExemptionCodes, 1, 1),
normalize-space(cbc:ID),
substring($VRBL-CL-AE-TaxExemptionCodes, 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-TaxExemptionCodes, 1, 1)
)
)
and
contains(
$VRBL-CL-AE-TaxExemptionCodes,
concat(
substring($VRBL-CL-AE-TaxExemptionCodes, 1, 1),
substring-after(normalize-space(cbc:ID), $VRBL-AE-Prefix),
substring($VRBL-CL-AE-TaxExemptionCodes, 1, 1)
)
)
)
)
)