VRBL-INV-PL-B2B-3-73
Basic Info
|
Rule
|
The value of the Invoice Line Tax Exemption Reason Code must be contained in PL Tax Exemption Reason Code [VRBL-CL-PL-TaxExemptionReasonCode] (prefixed by 'VRBL:PL:'). Allowed values: VRBL:PL:EX, VRBL:PL:KR, VRBL:PL:NP1, VRBL:PL:NP2, VRBL:PL:OO, VRBL:PL:WDT, VRBL:PL:ZW. |
|
Context
|
/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:TaxExemptionReasonCode
|
|
Pattern
|
vrbl-invoice-pl-b2b-3p0 |
|
Severity
|
fatal |
Used Template: CodeList
| Parameter |
|
Value |
| probe |
= |
.
|
| codeList |
= |
$VRBL-PL-Prefix:$VRBL-CL-PL-TaxExemptionReasonCode
|
| showValues |
= |
true
|
Implementation
not(boolean(.))
or
(
(
substring(normalize-space(.), 1, string-length($VRBL-PL-Prefix)) = $VRBL-PL-Prefix
and
not(
contains(
substring-after(normalize-space(.), $VRBL-PL-Prefix),
substring($VRBL-CL-PL-TaxExemptionReasonCode, 1, 1)
)
)
and
contains(
$VRBL-CL-PL-TaxExemptionReasonCode,
concat(
substring($VRBL-CL-PL-TaxExemptionReasonCode, 1, 1),
substring-after(normalize-space(.), $VRBL-PL-Prefix),
substring($VRBL-CL-PL-TaxExemptionReasonCode, 1, 1)
)
)
)
)