# BR-DEC-20 VAT category tax amount must not exceed two decimal places

The BT-117 VAT category tax amount is limited to a maximum of two decimal places. Any value carrying three or more fractional digits fails EN16931 validation.

## Problem Description

> **ERROR**: EN 16931 decimal precision rule (BR-DEC)

## Context and Significance

This is an EN16931 core decimal-precision constraint enforced by KoSIT: every monetary amount in the invoice must be expressed with no more than two decimals.

## Solution

Round BT-117 to two decimal places before serialising the amount, and apply the same rounding used in the BR-CO total and sum calculations so the invoice still reconciles.

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

## Valid Examples

- BT-117 = 171.00 — two decimals accepted

## Invalid Examples

- BT-117 = 171.000 — three decimals rejected

## Code Examples

### Valid XML
```
<cac:TaxTotal>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">900.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">171.00</cbc:TaxAmount>
  </cac:TaxSubtotal>
</cac:TaxTotal>
```

### Invalid XML
```
<cac:TaxTotal>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">900.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">171.000</cbc:TaxAmount>
  </cac:TaxSubtotal>
</cac:TaxTotal>
```

## Affected Fields

- [BT-117 VAT category tax amount](/resources/xrechnung/bt-117-vat-category-tax-amount)

## Related Rules

- [BR-CO-17](/resources/kosit-validator-errors/br-co-17-vat-category-tax-amount-must-match-base-times-rate)
- [BR-DEC-19](/resources/kosit-validator-errors/br-dec-19-vat-category-taxable-amount-max-two-decimals)

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