# BR-53 VAT total in accounting currency is required when a VAT currency is set

If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided.

## Problem Description

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

## Context and Significance

This is a conditional EN 16931 core rule. A typical case is an invoice issued in one currency while the VAT must be stated in the national currency of the member state, for example an invoice in EUR from a Swedish seller that must also state the VAT in SEK. As soon as BT-6 is filled, the VAT total in that currency (BT-111) is mandatory. The error appears when an export sets the tax currency in the header but does not write the second VAT total.

## Solution

As soon as cbc:TaxCurrencyCode (BT-6) is present, add a second cac:TaxTotal that contains only cbc:TaxAmount in that currency (currencyID equal to BT-6) and no cac:TaxSubtotal; Peppol BIS also checks this with PEPPOL-EN16931-R054. In CII, add a second ram:TaxTotalAmount with currencyID equal to ram:TaxCurrencyCode.

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

## Valid Examples

- BT-6 = SEK with BT-111 = 190.00 SEK next to the EUR VAT total

## Invalid Examples

- BT-6 = SEK is set but no BT-111 VAT total in SEK is present

## Code Examples

### Valid XML
```
<cbc:TaxCurrencyCode>SEK</cbc:TaxCurrencyCode>
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="EUR">19.00</cbc:TaxAmount>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">19.00</cbc:TaxAmount>
    <cac:TaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>19</cbc:Percent>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:TaxCategory>
  </cac:TaxSubtotal>
</cac:TaxTotal>
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="SEK">190.00</cbc:TaxAmount>
</cac:TaxTotal>
```

### Invalid XML
```
<cbc:TaxCurrencyCode>SEK</cbc:TaxCurrencyCode>
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="EUR">19.00</cbc:TaxAmount>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">19.00</cbc:TaxAmount>
    <cac:TaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>19</cbc:Percent>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:TaxCategory>
  </cac:TaxSubtotal>
</cac:TaxTotal>
```

## Affected Fields

- [BT-6 VAT accounting currency code](/resources/xrechnung/bt-6-vat-accounting-currency-code)
- [BT-111 Invoice total VAT amount in accounting currency](/resources/xrechnung/bt-111-invoice-total-vat-amount-in-accounting-currency)

## Related Rules

- [BR-45](/resources/kosit-validator-errors/br-45-vat-breakdown-taxable-amount-required)
- [BR-46](/resources/kosit-validator-errors/br-46-vat-breakdown-tax-amount-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.
