VRBL-INV-IT-1p2-233

Basic Info

Rule The Invoice Line Tax Exemption Reason Code must be in line with the Invoice Line Tax ID.
Context /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:TaxExemptionReasonCode
Pattern vrbl-invoice-it-1p2
Severity fatal

Implementation

not(contains($VRBL-IT-table-TaxExemptionReasonCode, concat(' ', substring-after(normalize-space(.), $VRBL-IT-Prefix),'#')))
or
contains($VRBL-IT-table-TaxExemptionReasonCode, concat(' ', substring-after(normalize-space(.), $VRBL-IT-Prefix), '#', normalize-space(../cbc:ID), ' '))