VRBL-INV-FR-CIUS-1p0-293

Basic Info

Rule An Invoice that contains an Invoice Line, a Sub Invoice Line Group, a Document Level Allowances or a Document Level Charges where the Tax Category ID is "Standard rated" must contain in the Tax Sub Total at least one Tax Subtotal Category ID equal with "Standard rated".
Context /ubl:Invoice
Pattern vrbl-invoice-fr-cius-1p0-min
Severity fatal

Implementation

     ((count(cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) + count(cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S']) + count(cac:InvoiceLine/cac:SubInvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'])) > 0     and     count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) > 0)     or     ((count(cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) + count(cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S']) + count(cac:InvoiceLine/cac:SubInvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'])) = 0     and     count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) = 0)