VRBL-INV-SG-1p4-20
Basic Info
| Rule | For non purchase invoces, the value of the Invoice Line Tax ID must be contained in Tax Category ID [VRBL-CL-GST-SG-TaxCategoryID] (prefixed by 'VRBL:SG:'). Allowed values: VRBL:SG:DS, VRBL:SG:ES33, VRBL:SG:ESN33, VRBL:SG:NA, VRBL:SG:NG, VRBL:SG:OS, VRBL:SG:SR, VRBL:SG:SRCA-C, VRBL:SG:SRCA-S, VRBL:SG:SRLVG, VRBL:SG:SROVR-LVG, VRBL:SG:SROVR-RS, VRBL:SG:SRRC, VRBL:SG:ZR. |
| Context |
/ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID
|
| Pattern | vrbl-invoice-sg-1p4 |
| Severity | fatal |
Used Template: CodeList
| Parameter | Value | |
|---|---|---|
| probe | = |
.
|
| codeList | = |
$VRBL-SG-Prefix:$VRBL-CL-GST-SG-TaxCategoryID
|
| showValues | = |
true
|
Implementation
(
(/ubl:Invoice/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:PurchaseInvoiceIndicator = 'true')
)
or
(
not(boolean(.))
or
(
(
substring(normalize-space(.), 1, string-length($VRBL-SG-Prefix)) = $VRBL-SG-Prefix
and
not(
contains(
substring-after(normalize-space(.), $VRBL-SG-Prefix),
substring($VRBL-CL-GST-SG-TaxCategoryID, 1, 1)
)
)
and
contains(
$VRBL-CL-GST-SG-TaxCategoryID,
concat(
substring($VRBL-CL-GST-SG-TaxCategoryID, 1, 1),
substring-after(normalize-space(.), $VRBL-SG-Prefix),
substring($VRBL-CL-GST-SG-TaxCategoryID, 1, 1)
)
)
)
)
)