# BR-O-01 Category O invoice needs exactly one not-subject-to-VAT breakdown

An invoice with any invoice line (BG-25), document level allowance (BG-20) or document level charge (BG-21) whose VAT category code (BT-151, BT-95 or BT-102) is "Not subject to VAT" (O) shall contain exactly one VAT breakdown (BG-23) whose VAT category code (BT-118) is "Not subject to VAT" (O).

## Problem Description

> **ERROR**: EN 16931 VAT category rule

## Context and Significance

Category O covers supplies outside the scope of VAT; this rule guarantees the single mandatory O summary so the tax total reconciles. In practice, the error occurs when out-of-scope lines are summarised in an E or Z breakdown instead of an O breakdown.

## Solution

Add a single cac:TaxTotal/cac:TaxSubtotal (BG-23) with cac:TaxCategory/cbc:ID = O summarising every not-subject-to-VAT amount; do not split category O across several breakdowns.

- [Validate XML](/en/xrechnung-validator?source=resource&rule=BR-O-01)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&rule=BR-O-01)

## Valid Examples

- One O line (BT-151 = O) summarised by one BG-23 breakdown with BT-118 = O

## Invalid Examples

- An O line (BT-151 = O) but no BG-23 breakdown carrying BT-118 = O

## Code Examples

### Valid XML
```
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
    <cac:TaxCategory>
      <cbc:ID>O</cbc:ID>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:TaxCategory>
  </cac:TaxSubtotal>
</cac:TaxTotal>
```

### Invalid XML
```
<cac:InvoiceLine>
  <cac:Item>
    <cac:ClassifiedTaxCategory>
      <cbc:ID>O</cbc:ID>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:ClassifiedTaxCategory>
  </cac:Item>
</cac:InvoiceLine>
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
</cac:TaxTotal>
```

## Affected Fields

- [BG-23 VAT breakdown](/resources/xrechnung/bt-116-vat-category-taxable-amount)
- [BT-118 VAT category code](/resources/xrechnung/bt-118-vat-category-code)
- [BT-151 Invoiced item VAT category code](/resources/xrechnung/bt-151-invoice-line-vat-category-code)

## Related Rules

- [BR-O-08](/resources/kosit-validator-errors/br-o-08-not-subject-taxable-amount-sum)
- [BR-O-11](/resources/kosit-validator-errors/br-o-11-forbids-other-vat-breakdowns)
- [BR-CO-18](/resources/kosit-validator-errors/br-co-18-vat-breakdown-required)

## Validation Tools

- [Official KoSIT Validator](https://github.com/itplr-kosit/validator): Run the official KoSIT validator with the XRechnung configuration to check EN 16931 and XRechnung rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Find validation errors during conversion and review each correction.

## Related Resources

- [Official Specification](https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [All validation errors](/resources/kosit-validator-errors): Overview of the EN 16931, XRechnung and Peppol validation rules explained here.
