# UBL-CR-561: Remove the tax total from invoice lines

A `cac:TaxTotal` inside a line is not part of EN 16931 and draws a warning. The document stays valid; VAT belongs in the document-level breakdown.

- Layer: EN 16931
- Severity: warning (the document stays valid)
- Topics: VAT, Lines and prices
- Official definition: https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/UBL-CR-561/
- Explanation last updated: 2026-09-24

## The short answer

`UBL-CR-561` is a warning, raised once for a document that has a `cac:TaxTotal` inside any `cac:InvoiceLine` or `cac:CreditNoteLine`. The document is still valid. Remove the line-level tax totals: EN 16931 has no VAT amount per line, and the VAT is already stated per category in the `cac:TaxTotal` directly beneath the document root.

What a line does carry is its VAT category and rate, in `cac:Item/cac:ClassifiedTaxCategory`. Keep that; the document-level breakdown is checked against it.

## What the rule checks

The rule is evaluated once, on the document root, and warns when at least one line has a `cac:TaxTotal` child. When tried with tax totals on two lines of a three-line invoice, a single warning was reported, located at the root and not at a line.

Nothing inside the line tax total is read. When tried, a line tax total of 999.00 on a 25.00 line produced the same lone warning, and so did one holding a full `cac:TaxSubtotal` with category and rate.

A warning does not make a document invalid. The recorded example comes back valid, with every layer passed and this one warning listed.

The line tax total cannot replace the line VAT category. When tried with `cac:ClassifiedTaxCategory` removed and only the line tax total left, the invoice failed `BR-CO-04` and three other rules on top of the warning.

| Term | Meaning | UBL element |
|---|---|---|
| - | Line tax total (no EN 16931 business term) | `cac:InvoiceLine/cac:TaxTotal (cac:CreditNoteLine/cac:TaxTotal in a credit note)` |
| BG-23 | VAT breakdown | `cac:TaxTotal/cac:TaxSubtotal` |
| BT-151 | Invoiced item VAT category code | `cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID` |
| BT-152 | Invoiced item VAT rate | `cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:Percent` |

## How an integration ends up here

Possible causes, from the shape of the rule rather than from measured usage:

- A general-purpose UBL 2.1 library or template writes `cac:TaxTotal` on each line because the UBL schema allows it there.
- The mapping was first written for another UBL-based format that expects a VAT amount per line, and the element was kept when the output moved to Peppol BIS.
- The source system calculates VAT line by line and the export writes each line result into the XML as well as summing it.

## How to fix it

1. Remove `cac:TaxTotal` from every `cac:InvoiceLine` or `cac:CreditNoteLine`.
2. Check that each line still has `cac:Item/cac:ClassifiedTaxCategory` with its VAT category code and, where the category takes one, its rate.
3. Make sure the VAT is stated in the document-level `cac:TaxTotal`: one `cac:TaxSubtotal` per category and rate with its taxable amount and tax amount, and the total VAT in the `cbc:TaxAmount` directly under `cac:TaxTotal`.
4. Calculate each breakdown tax amount from its taxable amount and rate rather than by adding up per-line VAT figures, which can drift away from taxable amount x rate. `BR-CO-17` makes that comparison.

## Before and after

These are fragments, not complete documents. The complete synthetic documents they come from are linked below.

Fragment of the invoice with the warning: the line carries its own tax total of 5.00

```xml
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
  <cbc:LineExtensionAmount currencyID="GBP">25.00</cbc:LineExtensionAmount>
  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="GBP">5.00</cbc:TaxAmount>
  </cac:TaxTotal>
  <cac:Item>
    <cbc:Name>Example service</cbc:Name>
    <cac:ClassifiedTaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>20</cbc:Percent>
      <!-- tax scheme omitted from this fragment -->
    </cac:ClassifiedTaxCategory>
  </cac:Item>
  <!-- price omitted from this fragment -->
</cac:InvoiceLine>
```

Fragment of the corrected invoice: the line has no tax total, and the 5.00 of VAT appears once, in the document-level breakdown

```xml
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="GBP">5.00</cbc:TaxAmount>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="GBP">25.00</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="GBP">5.00</cbc:TaxAmount>
    <cac:TaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>20</cbc:Percent>
      <!-- tax scheme omitted from this fragment -->
    </cac:TaxCategory>
  </cac:TaxSubtotal>
</cac:TaxTotal>
<!-- monetary totals omitted from this fragment -->
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
  <cbc:LineExtensionAmount currencyID="GBP">25.00</cbc:LineExtensionAmount>
  <cac:Item>
    <cbc:Name>Example service</cbc:Name>
    <cac:ClassifiedTaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>20</cbc:Percent>
      <!-- tax scheme omitted from this fragment -->
    </cac:ClassifiedTaxCategory>
  </cac:Item>
  <!-- price omitted from this fragment -->
</cac:InvoiceLine>
```

The invoice with the warning has a `cac:TaxTotal` of 5.00 between the line net amount and the item, and the corrected one does not. Nothing else differs; the document-level breakdown shown in the corrected fragment is present, with the same 5.00, in both. That invoice reports only `UBL-CR-561` and is valid with that warning, so the change tidies the document rather than rescuing it.

### What the validator reported

- The invoice with the warning is valid, and reports the warning **UBL-CR-561**. The corrected document passes every layer with no findings.
  - [Download the XML with the warning](https://ironfang.uk/finance/rule-examples/UBL-CR-561-warning.xml)
  - [Download the corrected XML](https://ironfang.uk/finance/rule-examples/invoice-minimal.xml)

Recorded on phive 12.1.0 / phive-rules-peppol 4.5.6 / Saxon-HE 12.10, the engine behind the free validator, using synthetic data. A recorded result is regression evidence for these documents; it is not a certification.

## Where it applies

- Applies to `Invoice` and `CreditNote`; in a credit note the element is `cac:CreditNoteLine/cac:TaxTotal`. When tried, a credit note with a line tax total received the same single warning at its root and remained valid.
- The warning comes from the EN 16931 layer, from the checks in the UBL binding that flag UBL elements with no place in the EN 16931 model. Other rules in the same family do this for other elements, such as `UBL-CR-006` for an issue time.
- Line tax totals do not count towards the Peppol limit on document-level tax totals. With a full subtotal inside a line tax total, `PEPPOL-EN16931-R053` was not reported when tried.

## Related rules

- [BR-CO-14 checks the document VAT total against the breakdown, where the VAT belongs](https://ironfang.uk/docs/finance/rules/BR-CO-14.md)
- [BR-CO-17 checks each breakdown tax amount against its taxable amount and rate](https://ironfang.uk/docs/finance/rules/BR-CO-17.md)
- [BR-CO-04 requires the VAT category on every line, which a line tax total cannot replace](https://ironfang.uk/docs/finance/rules/BR-CO-04.md)
- [UBL-CR-006 is another warning for a UBL element outside the EN 16931 model, the issue time](https://ironfang.uk/docs/finance/rules/UBL-CR-006.md)

## Scope and source

Written for Peppol BIS Billing 3.0.21 (May 2026), EN 16931 1.3.16, as applied to UBL 2.1 Invoice and CreditNote documents. Other profiles, syntaxes and releases can define this identifier differently. Guidance version 2026-09-24.1: source checked 2026-09-24, explanation last updated 2026-09-24.

[The official definition of UBL-CR-561](https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/UBL-CR-561/) carries the normative wording and test. This page is our explanation of it, not a copy.

Guidance does not change the engine verdict. Fixing this finding does not mean the document passes every layer, and validation does not certify legal or tax compliance or transmit a document over Peppol.

## Links

- [This rule as a web page](https://ironfang.uk/docs/finance/rules/UBL-CR-561)
- [Free Peppol invoice validator](https://ironfang.uk/tools/peppol-validator)
- [Rule index](https://ironfang.uk/docs/finance/rules.md)
- [Ironfang Finance API docs](https://ironfang.uk/docs/finance)
- The same rule is available to MCP clients as the tool `finance.rule.get` on https://mcp.ironfang.uk/mcp
