Skip to main content
VeriFactu

VeriFactu errors with the optional fields: Macrodato, Cupon, simplified invoices and agreements

The VERI*FACTU record of an invoice has fields that hardly anyone uses: the one for invoices over one hundred million, the coupon flag, the one for qualified simplified invoices or the billing agreement number. They are optional, but if they are filled in, the AEAT, the Spanish tax agency, requires them to fit the invoice type. Ten codes watch over that consistency.

FlexigoTech · Editor in charge: Víctor Gómez · Updated 4 November 2026

Key facts

Module
VeriFactu
Versions
Odoo 17, 18, 19 and 20
Checked
in the module's source code, version 20.0 · against the sources linked at the end
Reading time
3 min

Field by field

Macrodato
Mandatory with value S when the total amount is equal to or above 100,000,000.00 in absolute value. It only accepts N or S (1137). With S and a smaller amount, 1138; without S and a larger amount, 1139.
Cupon
It can only be S on an R1 or an R5. Otherwise, 1157.
FacturaSimplificadaArt7273
For the qualified simplified invoices of the Spanish invoicing regulation. It only accepts N or S (1136) and it can only be S on F1, F3, R1, R2, R3 or R4 (1183).
FacturaSinIdentifDestinatarioArt61d
For invoices that do not identify the recipient under article 61 d. It only accepts N or S (1184) and it can only be S on F2 or R5 (1185).
NumRegistroAcuerdoFacturacion
If reported, the agreement has to exist at the AEAT. If it does not, 1128.
RefExterna
A free reference of the system itself. If its value is not valid, 1253.

All ten reject the invoice record.

Card for the VeriFactu optional field codes
The ten codes for the record's optional fields, in amber: they all reject the affected invoice.

What our module sends

None of these six fields appears in the registration record built by the module. That is why these codes cannot come from one of its submissions. For most companies nothing changes, because these fields cover rare cases and leaving them out causes no rejection. Two of them do have consequences worth knowing:

  1. The billing agreement and article 61 d. They are the two exceptions to the 3,000.00 euro cap that the AEAT applies to simplified invoices with 1150 (the general legal limit is lower: 400 euros including VAT). Since the module does not send them, an F2 above that amount is always rejected with 1150, even if you have an agreement with the AEAT. We explain it on the error 1150 page.
  2. Qualified simplified invoices. The module classifies as F2 the POS invoices, those ticked as simplified and those of customers without a tax ID, and it does not tell qualified simplified invoices apart. If you issue them, write to us.
AEAT error catalogue in Odoo with the text of each code
The AEAT catalogue inside Odoo, with the literal text and the explanation of each code, including the optional fields. Odoo 20 screenshot with demo data.

Macrodato, in numbers

The AEAT asks for Macrodato to be flagged when the invoice total reaches 100,000,000.00, positive or negative. It is a flag for invoices with a very high amount, and the check works both ways: you cannot flag it below the threshold or leave it unflagged above it. With the published module, an invoice of that size would go out without the flag and the AEAT would reject it with 1139; if you issue invoices like that, talk to us first.

The codes on this page, with the AEAT's text

Each code with its literal text, in Spanish, as the AEAT's error list gives it:

CodeAEAT text (Spanish)
1136El campo FacturaSimplificadaArticulos7273 solo acepta valores N o S.
1137El campo Macrodato solo acepta valores N o S.
1139Si el campo ImporteTotal está informado y es igual o superior a +-100.000.000 el campo Macrodato debe estar informado con valor S.
1157El valor de cupón solo puede ser S o N si está informado. El valor de cupón sólo puede ser S si el tipo de factura es R1 o R5.
1183El campo FacturaSimplificadaArticulos7273 solo se podrá rellenar con S si TipoFactura es de tipo F1 o F3 o R1 o R2 o R3 o R4.
1184El campo FacturaSinIdentifDestinatarioArt61d solo acepta valores S o N.
1185El campo FacturaSinIdentifDestinatarioArt61d solo se podrá rellenar con S si TipoFactura es de tipo F2 o R5.
1128No existe acuerdo de facturación.
1253El valor del campo RefExterna tiene un valor incorrecto.
1138El campo Macrodato solo debe ser informado con valor S si el valor de ImporteTotal es igual o superior a +-100.000.000

Where do I see these codes if I get them?

In AEAT Submission › AEAT Errors, grouped by code, and their full text in the AEAT Error Catalogue. If you get one with a submission from the module, send us the answer at comercial@flexigobe.com, because it would mean something other than the module is filling those fields.

Keep reading

VeriFactu error 1150: a simplified invoice that goes over 3,000 eurosVeriFactu error 1150 rejects a simplified invoice (F2) above 3,000 euros. Why Odoo sends it as F2 and how to avoid it in Odoo 17, 18, 19 and 20 with our module.VeriFactu errors with invoices issued by a third party or by the recipientVeriFactu errors on invoices issued by a third party or by the recipient (1151, 1155, 1158, 1159, 1178, 1186 to 1188, 1211) and what Odoo declares with our module.VeriFactu errors 1189, 1190, 1191 and 1192: invoice type and recipient have to matchVeriFactu errors that cross the invoice type with the recipient (1189, 1190, 1191, 1192, 1106 and 1156): the AEAT rule and what Odoo decides when an invoice is posted.
Checked in the module's source code (version 20.0) and the linked sources

Sources