Skip to main content

einvoice_display_mismatch

HTTP 422 · code: "einvoice_display_mismatch" · type: https://docs.formfeed.dev/errors/einvoice-display-mismatch

The render asked for an e-invoice with display_check: "strict", and the text of the finished PDF does not show a value its XML states: the invoice number (BT-1), the net total (BT-109), the VAT total (BT-110), the total (BT-112), the amount due (BT-115) where it differs from the total, and with more than one VAT rate the VAT amount of each (BT-117). Amounts of zero are not looked for. The display check explains what is looked for.

detail names the values that are missing, einvoice.display.missing their business terms. The file itself was valid, which einvoice.validation says. The render is failed and keeps the report; no file is stored, and a failed render costs nothing. With display_check: "warn", the default, the same finding does not fail the render.

Where the render also set pdf.ua, the problem carries accessibility as well: the file had been checked against PDF/UA-1 by then, and the block says what that check found.

Example​

{
"type": "https://docs.formfeed.dev/errors/einvoice-display-mismatch",
"title": "PDF does not show the e-invoice",
"status": 422,
"detail": "The PDF does not show the VAT total 182.40 (BT-110) of the e-invoice",
"code": "einvoice_display_mismatch",
"location": null,
"render_id": "rnd_7da09ab6cd9946b798c187c2a9350852",
"einvoice": {
"profile": "en16931",
"flavour": "factur-x",
"spec_version": "1.09",
"xml_url": null,
"validation": {
"valid": true,
"schematron": "Factur-X 1.09.2 (Mustang 2.26.0)",
"pdfa": "PDF/A-3b",
"messages": []
},
"display": {
"checked": ["BT-1", "BT-109", "BT-110", "BT-112"],
"missing": ["BT-110"]
}
},
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}

Common causes​

  • The template adds up its own totals from other fields than _invoice, and they differ from the block, for example because it rounds line by line.
  • The template does not print the value at all, such as an invoice without a line for the VAT total.
  • The template prints a rounded amount: 1.142 € does not show 1142.40.
  • The template prints another invoice number than _invoice.number.
  • The value is part of a picture. The check reads the text of the PDF.

How to fix it​

  • Print the values of _invoice in the template instead of values from other fields.
  • In the editor, the Flow and Paged previews of an invoice template count the values the document shows, and the Problems list names each one that is missing, before anything is rendered.
  • To get the file while you fix the template, set display_check back to warn. The render then succeeds and reports the same values in einvoice.display.missing. The XML is the invoice, and a PDF that shows other invoice details can count as a second invoice, so do not leave it at that.

Retry?​

No. Retrying the same request gives the same answer; change the template or the data first. Send the corrected request with a new Idempotency-Key or without one: a 4xx answer is stored under its key for 24 hours, so the old key returns this problem again. See retrying.