# BR-38 Document level charge reason or reason code is required

Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105).

## Problem Description

> **ERROR**: EN 16931 core business rule (CEN)

> **Where BR-38 is checked**
>
> A validator checks an e-invoice in stages. First the file must be well-formed XML that matches the UBL or CII schema (XSD). Then the EN 16931 business rules run: BR core rules, BR-CO calculations, BR-CL code lists, BR-DEC decimals and VAT-category rules such as BR-S. Next come the national or network rules that BT-24 selects: BR-DE for XRechnung, PEPPOL-EN16931 for Peppol BIS Billing. The report lists every failed rule: one error means reject, warnings alone still mean accept. BR-38: EN 16931 core rule, reported in the stage “EN 16931 rules”.

## Solution

Add cbc:AllowanceChargeReason text or cbc:AllowanceChargeReasonCode (UNCL7161) to the charge; if both are given they must describe the same reason.

- [Check XML for free](/en/xrechnung-validator)

## Context and Significance

This is an EN 16931 core rule and the charge counterpart of BR-33. The buyer must understand what the charge is for, for example freight, insurance or packaging. The error appears when the export writes only the charge amount without a reason text or UNCL7161 code; provide at least one. If both are given, BR-CO-06 requires that they describe the same reason.

## Valid Examples

- BT-104 = "Freight"
- BT-105 = FC (freight charge)

## Invalid Examples

- Document charge with amount only, no reason or reason code

## Code Examples

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

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

## Affected Fields

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

## Related Rules

- [BR-36](/en/resources/kosit-validator-errors/br-36-document-charge-amount-required)
- [BR-37](/en/resources/kosit-validator-errors/br-37-document-charge-vat-category-required)
- [BR-CO-06](/en/resources/kosit-validator-errors/br-co-06-charge-reason-code-match)

## 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](/en/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](/en/resources/kosit-validator-errors): Overview of the EN 16931, XRechnung and Peppol validation rules explained here.
