BR-FREXT-CO-04
The rule sets below word this rule differently; each wording is shown with its rule set.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151), if the "Subtype of invoice line item" (EXT-FR-FE-163 / BT-X-8) has the value "DETAIL" or is not specified.
cac:InvoiceLine | cac:CreditNoteLine
not($lineInCalul) or (exists(cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID))
Checked with France EXTENDED-CTC-FR (UBL)
Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151) if the "Subtype of invoice line item" (EXT-FR-FE-163 / BT-X-8) has the value "Normal line item (standard case)" (DETAIL) or is not specified.
//ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument[not(ram:LineStatusReasonCode) or ram:LineStatusReasonCode = 'DETAIL']
(../ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Checked with France EXTENDED-CTC-FR (CII)