# BR-AE-01 Reverse charge requires exactly one reverse charge VAT breakdown

An invoice that contains an invoice line (BG-25), a document level allowance (BG-20) or a document level charge (BG-21) with VAT category code (BT-151, BT-95 or BT-102) "Reverse charge" (AE) shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal to "VAT reverse charge".

## Problem Description

An invoice that contains an invoice line (BG-25), a document level allowance (BG-20) or a document level charge (BG-21) with VAT category code (BT-151, BT-95 or BT-102) "Reverse charge" (AE) shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal to "VAT reverse charge".

> **ERROR**: XRechnung 3.0

## Context and Significance

This EN16931 rule governs reverse charge (category AE), where the buyer accounts for VAT; it guarantees a single, unambiguous AE summary line so the shifted tax liability is reported once.

## Solution

Add a single cac:TaxTotal/cac:TaxSubtotal (BG-23) whose cac:TaxCategory/cbc:ID (BT-118) is AE, summarising all reverse charge lines, allowances and charges; do not split it into several AE breakdowns.

- validate
- convert

## Valid Examples

- One reverse charge line (BT-151 = AE) and one BG-23 breakdown with BT-118 = AE

## Invalid Examples

- Reverse charge lines present but no BG-23 breakdown carries BT-118 = AE

## Code Examples

### Valid XML
```
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">1000.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
    <cac:TaxCategory>
      <cbc:ID>AE</cbc:ID>
      <cbc:Percent>0</cbc:Percent>
    </cac:TaxCategory>
  </cac:TaxSubtotal>
</cac:TaxTotal>
```

### Invalid XML
```
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">1000.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">190.00</cbc:TaxAmount>
    <cac:TaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>19</cbc:Percent>
    </cac:TaxCategory>
  </cac:TaxSubtotal>
</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-AE-08](/resources/kosit-validator-errors/br-ae-08-reverse-charge-taxable-amount-sum)
- [BR-AE-09](/resources/kosit-validator-errors/br-ae-09-reverse-charge-tax-amount-zero)
- [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.
