# 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

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).

> **ERROR**: XRechnung 3.0

## Context and Significance

Category O (not subject to VAT) covers supplies outside the scope of VAT; this rule guarantees the mandatory single O summary exists so the tax total reconciles.

## 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
- convert

## 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:TaxCategory>
  </cac:TaxSubtotal>
</cac:TaxTotal>
```

### Invalid XML
```
<cac:InvoiceLine>
  <cac:Item>
    <cac:ClassifiedTaxCategory>
      <cbc:ID>O</cbc:ID>
    </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-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://erechnungsvalidator.service-bw.de/): Validate your XRechnung files against all BR-DE rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Automatic validation error fixes when converting.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [Complete Error List](/resources/kosit-validator-errors): Overview of all German XRechnung validation rules.
