# BR-CL-20 Coded charge reason must come from UNCL7161

When a charge reason is coded (BT-105 at document level, BT-145 at line level), the code must belong to the UNCL7161 code list.

## Problem Description

> **ERROR**: EN 16931 code-list rule (BR-CL)

## Context and Significance

Charges use UNCL7161, a list of mostly letter codes, while allowances use the numeric UNCL5189 codes (BR-CL-19). The rule fails when an allowance code such as 95 is sent on a charge, when a discount is marked as a charge (ChargeIndicator true), or when a text such as "FREIGHT" sits in the code field. Example: shipping costs added at document level use code FC with the reason "Freight".

## Solution

Set the charge reason code to a UNCL7161 value, e.g. FC (freight service), PC (packing), ABL (additional packaging) or SAA (shipping and handling); give any other reason as free text (BT-104 or BT-144). In UBL, the code is cbc:AllowanceChargeReasonCode in a cac:AllowanceCharge with cbc:ChargeIndicator true; in CII, ram:ReasonCode in a ram:SpecifiedTradeAllowanceCharge.

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

## Valid Examples

- BT-105 = FC — freight service
- BT-145 = ABL — additional packaging at line level

## Invalid Examples

- BT-105 = 95 — allowance code (UNCL5189) on a charge
- BT-105 = FREIGHT — free text instead of a code

## Code Examples

### Valid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>FC</cbc:AllowanceChargeReasonCode>
</cac:AllowanceCharge>
```

### Invalid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
</cac:AllowanceCharge>
```

## Affected Fields

- [BT-105 Document level charge reason code](/resources/xrechnung/bt-105-document-level-charge-reason-code)
- [BT-145 Invoice line charge reason code](/resources/xrechnung/bt-145-invoice-line-charge-reason-code)

## Related Rules

- [BR-CL-19](/resources/kosit-validator-errors/br-cl-19-uncl5189-allowance-reason)

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