# BR-CO-22 Document charge needs a reason or reason code

Each document level charge (BG-21) shall contain a document level charge reason (BT-104) or a document level charge reason code (BT-105), or both.

## Problem Description

Each document level charge (BG-21) shall contain a document level charge reason (BT-104) or a document level charge reason code (BT-105), or both.

> **ERROR**: XRechnung 3.0

## Context and Significance

This EN16931 core rule ensures every surcharge is justified so buyers and auditors can see why the amount was added.

## Solution

For every document level charge, add an AllowanceChargeReason (BT-104) and/or AllowanceChargeReasonCode (BT-105).

- validate
- convert

## Valid Examples

- Document charge with BT-105 = FC and BT-104 = "Freight charge"

## Invalid Examples

- Document charge amount 15.00 with neither BT-104 nor BT-105

## Code Examples

### Valid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>FC</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Freight charge</cbc:AllowanceChargeReason>
  <cbc:Amount currencyID="EUR">15.00</cbc:Amount>
</cac:AllowanceCharge>
```

### Invalid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:Amount currencyID="EUR">15.00</cbc:Amount>
</cac:AllowanceCharge>
```

## Affected Fields

- [BG-21 Document level charges](/resources/xrechnung)
- [BT-104 Document level charge reason](/resources/xrechnung/bt-104-document-level-charge-reason)
- [BT-105 Document level charge reason code](/resources/xrechnung/bt-105-document-level-charge-reason-code)

## Related Rules

- [BR-CO-06](/resources/kosit-validator-errors/br-co-06-charge-reason-code-match)
- [BR-CO-21](/resources/kosit-validator-errors/br-co-21-document-allowance-reason-required)
- [BR-CO-24](/resources/kosit-validator-errors/br-co-24-line-charge-reason-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.
