# BR-CO-04

Source: https://xmlvalid.com/rules/BR-CO-04

> Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).

- Level: error
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `cac:InvoiceLine | cac:CreditNoteLine`
- Test: `(cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID)`

> Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII), Factur-X EN 16931 rules 1.09.2
- Context: `//ram:IncludedSupplyChainTradeLineItem`
- Test: `(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)`

## Why it fails

- A line's item has no VAT category: `cac:Item/cac:ClassifiedTaxCategory` with a `cbc:ID` and the tax scheme `VAT` is missing (`ram:ApplicableTradeTax/ram:CategoryCode` in CII).

## How to fix it

- Give every line its VAT category code (`S` standard, `Z` zero rated, `E` exempt, `AE` reverse charge, `K` intra-community, `G` export, `O` not subject to VAT) and, except for `O`, its rate.

Validate a document against these rules: https://xmlvalid.com/validate
