# BR-37 Document level charge VAT category code is required

Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102).

## Problem Description

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

## Context and Significance

This is an EN 16931 core rule and the charge counterpart of BR-32. A document level charge such as freight is subject to VAT in a specific category and counts towards that category’s taxable amount in the VAT breakdown (BG-23). Without BT-102 the breakdown cannot be recalculated. The error often appears when a charge is added in the invoice footer without any tax setup.

## Solution

Add cac:TaxCategory/cbc:ID (CII: ram:CategoryTradeTax/ram:CategoryCode) to the charge, using the VAT category under which the charge is taxed.

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

## Valid Examples

- BT-102 = S (standard rate) on a document level charge

## Invalid Examples

- Document charge amount present but no BT-102 category code

## Code Examples

### Valid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:Amount currencyID="EUR">9.90</cbc:Amount>
  <cac:TaxCategory>
    <cbc:ID>S</cbc:ID>
    <cbc:Percent>19</cbc:Percent>
    <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
  </cac:TaxCategory>
</cac:AllowanceCharge>
```

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

## Affected Fields

- [BT-102 Document level charge VAT category code](/resources/xrechnung/bt-102-document-level-charge-vat-category-code)

## Related Rules

- [BR-36](/resources/kosit-validator-errors/br-36-document-charge-amount-required)
- [BR-38](/resources/kosit-validator-errors/br-38-document-charge-reason-required)

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