BR-FREXT-CO-04

The rule sets below word this rule differently; each wording is shown with its rule set.

error: the document is invalid

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.

Message

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.

Context
cac:InvoiceLine | cac:CreditNoteLine
Test
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)

Message

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.

Context
//ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument[not(ram:LineStatusReasonCode) or ram:LineStatusReasonCode = 'DETAIL']
Test
(../ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)

Checked with France EXTENDED-CTC-FR (CII)