The SAF-T is not generated or is Invalid: the period crosses fiscal years, the accounting referential is missing or a tax number is missing
Symptom
One of two things happens:
- in the Generate SAF-T (PT) window, you clicked Generate with … documents and an error window opened: no export record was created;
- the export record is Invalid and has no Download file.
The steps to generate the file are in How to generate the invoicing SAF-T file and in How to generate the accounting SAF-T, and how to read and correct the error list of an invalid file is in How to correct SAF-T validation errors. This article brings together the window's refusals and what to do with the invoice of a customer from another country without a tax number (NIF).
Message
The window's refusals, triggered in the demo database. The parts in italics change with the dates and the company.
With Custom range from 01/12/2025 to 31/01/2026 (Accountant profile), the Validation Error window:
“The period 01/12/2025 to 31/01/2026 crosses fiscal years: a SAF-T (PT) file covers a single fiscal year, and the one starting on 01/12/2025 ends on 31/12/2025. Choose an end date up to 31/12/2025 and generate another file for the next fiscal year.”
With a period of more than one year (01/01/2025 to 31/03/2026), also Validation Error:
“The period cannot span more than one fiscal year (366 days). Narrow the period, or create one file per fiscal year.”
With the Date To before the Date From (31/10/2026 to 01/10/2026):
“The end date cannot be before the start date. Change the dates so that the start is on or before the end.”
With the Mode C — Accounting in a company without an accounting referential, the Warning window, with the Open the company and Close buttons:
“Company "Empresa Teste Filial" has no accounting referential (SNC, SNC-PE, SNC-ME, ...). It determines the SAF-T taxonomy reference, so this operation cannot continue. Set it in the company form (tab PT Localization) and try again.”
With a Company in the window that is not ticked in the company selector, at the top of the screen, the Invalid Operation window:
“Company "Empresa Teste Filial" is not active in your session. What happened: a company's SAF-T file is generated with that company ticked at the top of the screen. How to fix it: tick "Empresa Teste Filial" in the company selector, at the top of the screen (or choose a company that is already ticked), and generate again.”
The last two were triggered with the administrator, the only demo user with access to more than one company.
Verified causes
- The period crosses two fiscal years, or is longer than one year. A SAF-T file covers a single fiscal year: fiscaldoo does not let you generate one that crosses two. In the demo the fiscal year is the calendar year, so December and January do not go in the same file.
- The end date is before the start date. This happens when typing the dates by hand in Custom range.
- The company has no accounting referential (SNC, SNC-PE, SNC-ME…). It only matters in the C — Accounting and I — Integrated accounting/invoicing modes. In the same company without a referential, the F — Invoicing mode does not give this refusal: it generated the September 2026 file (Generate with 0 documents, record Generated, with 0 errors).
- The window's Company is not ticked at the top of the screen. The window's Company list shows all the user's companies, but the file is only generated for a company ticked in the company selector at the top of the screen (the one shown at the top, if only one is ticked). In the demo, with Empresa Teste Filial chosen at the top, the window opened with it and did not give this error.
- A supplier's or a customer's tax number is missing. A supplier without a tax number can make the record Invalid (in a C or I file, because of their purchase invoices), with the Key showing their name; a customer without a tax number does not, it only gives a warning. Which files each one counts in, and the example through to Generated, are in How to correct SAF-T validation errors, sections “Supplier without a tax number” and “Customer without a tax number: not an error”.
What to check
- The error window that appeared: its title (Validation Error, Warning or Invalid Operation) and its text.
- In STEP 1 OF 3: PERIOD, the Mode, the Period, the Date From and the Date To.
- That the window's Company is ticked in the company selector, at the top of the screen.
- On an Invalid record, the Error Count, the Errors by type and, in the Errors list, the Key column: the name of the customer or supplier.
- For a tax number error or warning, the Country on the contact form, whether it is an individual or a company, and whether it really has a tax number from its country.
How to fix it
The period crosses fiscal years, exceeds one year or has the dates swapped
Click Close. In Period, choose Month, Quarter or Fiscal Year, which calculate the dates on their own, or correct the dates of the Custom range so they fall within one fiscal year, with the start date before the end date. For a period that runs from one fiscal year into the next, generate one file for each fiscal year. In the demo, with Month and the Reference date 15/10/2026, the file was generated from 01/10/2026 to 31/10/2026.
Who does it: whoever generates the file (Accountant profile or above).
The company has no accounting referential
For the invoicing file, check that the Mode is F — Invoicing: it does not need the referential. For an accounting file (modes C or I), the referential must be chosen first: How to choose the accounting referential and the entity category. That article is done with the administrator profile, with the certified accountant's decision. Then generate again.
Who does it: the administrator, with the certified accountant.
The window's Company is a different one
Click Close, close the Generate SAF-T (PT) window, choose the file's company in the company selector, at the top of the screen, and open Accounting › Declare › SAF-T file › Generate SAF-T again. The window opens with that company.
Who does it: whoever generates the file.
The file is Invalid
Read the Errors list and correct each line as described in How to correct SAF-T validation errors. Do not submit an Invalid file. A customer from another country without a tax number does not make the file invalid, but it may leave an incorrect invoice: see the next section.
Who does it: whoever the Who corrects it column names.
The customer is from another country and has no tax number
The file does not become Invalid because of this: what it does with the customer, and the warning, are in How to correct SAF-T validation errors, section “Customer without a tax number: not an error”. The question is the invoice already issued. Check which customer it is:
- An individual who has no tax number. This is the warning case: the file asks for nothing.
- A customer who has a tax number that was not recorded. Check the number on a document from the customer and type it on the contact form. The form of a customer without a tax number who has certified documents warns at the top: “This partner is used in certified documents and has no tax number: you can fill in the tax number here and save. Documents already issued keep the data they were issued with (in the SAF-T they appear as "Final consumer", with a warning) and the tax number filled in now only applies to documents issued from now on. Once filled in, the tax number can no longer be changed here and the partner cannot be deleted (archive it).” The following invoices are issued with the tax number. If the customer also wants the invoice already issued with the tax number, correct it with Correct the customer data, which issues the credit note and prepares the new invoice. The steps, and where the button is in each profile, are in I cannot change an invoice already issued.
- A company from another European Union country. The invoice issued without a tax number went out as a sale to an individual: Fiscal Position “Intra-comunitário privado (UE)” and Portuguese VAT. Talk to the certified accountant before correcting it: the new invoice may need different VAT, and the intra-community exemption only applies with a tax number that is valid in VIES (How to create a customer with the right tax data). Pending validation by a certified accountant: invoice issued without a tax number to a company from another EU country, with the Portuguese VAT of a sale to an individual. An invoice to a taxable person acquirer carries their tax number (VAT Code (CIVA), art. 36.º, n.º 5, a)), and the sale of goods dispatched to another Member State to a company registered there, which uses its tax number, may follow the exemption for intra-community supplies (Intra-Community VAT Regime (RITI), art. 14.º, n.º 1, a)). The VAT of the new invoice and the regularization date are still to be decided.
Example, through to the file again. In the demo, on 31/10/2026:
- With the Billing profile, the tax number
ES12345678Z(fictitious) was typed on the Cliente Particular Espanha form and saved. The form showed Tax number to validate and Not checked in VIES. - The invoice to correct is
FT D26/36, of €10.00 + €2.30 VAT at 23 %, issued earlier without a tax number (the one in the example of How to issue a certified invoice). Correct the customer data opened the window with the Customer on the issued invoice “Cliente Particular Espanha, Espanha, Consumidor final”. With the Regularization proof filled in, Issue credit note and prepare new invoice issuedNC D26/2, of €12.30, with the reference “NC de FT D26/36: Correction of the customer data”, and opened the draft of the new invoice, with the tax number, the same line, VAT at 23 % and the Fiscal Position “Intra-comunitário privado (UE)”. The draft opens with the warning “The VAT number of this EU customer is not validated in VIES, so Portuguese VAT was applied and not the intra-community exemption. Open the customer and press "Validate VIES"; if the number is valid, come back to this draft and press "Recalculate VAT".”. The tax number has not yet been validated in VIES; the VAT of the new invoice for an EU company is decided with the certified accountant (previous point). Confirm issuedFT D26/39, of €12.30, dated 31/10/2026, and its history says the sale does not go into box 7 of the VAT return or into the recapitulative statement, because no line has the intra-community exemption. - The journal entries, checked with the Fiscal officer profile:
NC D26/2debits €10.00 to 711 Mercadorias and €2.30 to 2433 IVA - Liquidado and credits €12.30 to 2111 Clientes gerais;FT D26/39does the reverse. Pending validation by a certified accountant: VAT regularization of the credit note that corrects the customer data (VAT Code (CIVA), art. 78.º). - With the Accountant profile, the October F file generated again (Generate with 16 documents: 11 sales documents, 4 delivery notes and 1 proforma document) was Generated, with 0 errors and 8 warnings. The warning for this customer without a tax number remains, because
FT D26/36does not change.FT D26/39andNC D26/2appear in the file with the customer identified (tax number12345678Z, country ES), and the credit note carries the reference toFT D26/36. The three new warnings come from the address on the customer form, which has no street, town or postcode: fill them in on the form. Pending validation by a certified accountant: which acquirer the credit note that corrects an invoice issued to a final consumer should show in the SAF-T.
Who does it: whoever maintains the contacts (Accountant or Billing) fills in the tax number on the form; who corrects the invoice is in I cannot change an invoice already issued; the certified accountant decides what to do with a company's invoice.
Generating the file and filling in the tax number on the form do not create journal entries. The credit note and the new invoice create their own (step 3).
Expected result
- With the right dates and company, the window creates the export record.
- After Regenerate, the new record is Generated, with Error Count 0, and has Download file. The invalid record stays as history.
- For an invoice to a European Union company, a valid file is not enough: the invoice stays as the certified accountant decides.
- After a credit note and a new invoice with the tax number, the month's file carries all three documents, and the old invoice's warning remains. The customer the credit note shows in the file is pending validation (step 4).
When to contact support
- The file is Invalid because of a missing tax number in a case where How to correct SAF-T validation errors says it should not be.
- The record is in the Error state (generation failed), or an error window appears that is not in this article.
- The window refuses a single-month period, within the fiscal year, in a company ticked at the top of the screen.
Information to send
- The full text of the error window, copied from the screen, or the Export errors (XLSX) sheet of the invalid record.
- The name of the export record (company, date and time), the Mode and the dates.
- The customer's name, their country and whether it is an individual or a company, when the error is about a tax number.
- The profile you logged in with.