invoice.status
Invoice status code and date consistency
InvoiceStatus must be one of N/S/A/R/F and InvoiceStatusDate must be >= InvoiceDate.
What this checks
Each <Invoice><DocumentStatus> block must satisfy two consistency rules:
InvoiceStatusis one of the AT-defined codes:N,S,A,R,F.InvoiceStatusDateis greater than or equal to the invoice's ownInvoiceDate.
The status codes
| Code | Meaning |
|---|---|
N | Normal — the invoice is active and effective. |
S | Self-billing. |
A | Anulada — annulled / voided. |
R | Resumido — summary document (covers a period). |
F | Faturada — billed (intermediate state). |
Why the date consistency matters
A status event cannot predate the document it refers to. AT rejects an invoice marked A on 2025-12-30 if the invoice itself was issued on 2026-01-15 — the timeline is impossible. Same logic as a refund happening before a sale.
Examples
| InvoiceDate | InvoiceStatus | InvoiceStatusDate | Verdict |
|---|---|---|---|
| 2026-01-15 | N | 2026-01-15T10:00:00 | ✓ |
| 2026-01-15 | A | 2026-01-20T09:00:00 | ✓ annulment after issue |
| 2026-01-15 | A | 2025-12-30T09:00:00 | ✗ status before invoice |
| 2026-01-15 | X | 2026-01-15 | ✗ unknown status code |
How to fix
Both are ERP data-integrity issues, not user-correctable in the SAF-T directly. Investigate the document in your accounting system and confirm: was it annulled retroactively? Was the timestamp on the status event clobbered? Re-export once the source data is consistent.