# Totals, VAT, and rounding

How Cortena handles totals, tax keys, and rounding differences.

Cortena tracks two views of your invoice total: what was **extracted** from the document and what is **calculated** from line items and VAT rates. Understanding both helps you fix review queues and pass export checks.

**Who this is for:** AP clerks and controllers who see total warnings, VAT validation errors, or export preview mismatches on supplier invoices.

## 1. Extracted total vs calculated total

| Value | Source |
| --- | --- |
| **Extracted total** | Read from the invoice PDF, scan, or e-invoice XML |
| **Calculated total** | Sum of line amounts + VAT lines Cortena computed |

When they differ beyond a small tolerance, the invoice may show **Needs review** or trigger a workflow condition on totals mismatch. Open line items and check quantity, unit price, VAT rate, and discounts.

## 2. VAT styles on the invoice

Suppliers present VAT differently. Cortena normalises common patterns:

| Style | Example on document |
| --- | --- |
| **Net + VAT per line** | Unit price excl. VAT, VAT % per row |
| **Gross lines** | Amount includes VAT; Cortena backs out net |
| **Summary block only** | One subtotal + VAT 19% + total at bottom |
| **Mixed rates** | 7% and 19% on different lines (common in DE) |

Edit line items on the detail panel if extraction misread a rate or amount. Changes update the **calculated** total immediately.

## 3. Export preview uses stored values

Before sending to DATEV, Twinfield, Exact, or Agicap, Cortena's **export preview** shows exactly what will leave the system, based on **saved** invoice and match data, not a hidden recalculation at export time.

If preview totals differ from what you expect:

1. Fix line items or header totals on the invoice detail.
2. Re-check **BU / VAT codes** on each line.
3. Run export. Preview will match what ends up in your accounting system.

## 4. Workflow and validation

Your workflow may branch on:

- **Extracted vs calculated total** · send mismatches to review
- **Invalid VAT ID** · EU VIES check failed
- **Missing booking account** · line without match

Configure these in **Workflow**. See [Workflow configuration](https://help.cortena.ai/guides/workflows/workflow-configuration).

## 5. Quick fixes

| Problem | Try |
| --- | --- |
| Totals mismatch after scan | **Reprocess** or fix lines manually |
| Wrong VAT % | Edit line → pick correct BU/VAT code |
| Export rejects VAT | Sync VAT codes from accounting; update guidelines sheet |

## Quick reference

| Term | Meaning |
| --- | --- |
| Extracted total | From document / XML |
| Calculated total | From Cortena line math |
| Export preview | What will be sent · matches stored data |
| Fix mismatch | Edit lines or [reprocess](https://help.cortena.ai/guides/invoices/reprocess) |
