The invoice cannot be posted: the number must be assigned by the fiscal series
Symptom
One of these things happens:
- a draft invoice that came from an import already has a number at the top (for example
FT IMP26/3) and, when you click Confirm, the Invalid Operation window appears; - when you import invoices from a file, the import is refused with “Error at row …” saying the document cannot be created with a number;
- a program connected to fiscaldoo (an integration) receives the refusal to create an invoice with a number or already posted.
In a Portuguese company, an invoice's number is given by the fiscal series at the moment the invoice is confirmed, together with the ATCUD and the signature. A number typed by hand, or brought in a file, has neither.
Message
When you click Confirm on a draft invoice that already has a number:
“Document "Invoice draft FT IMP26/3" cannot be posted: its number must be assigned by the fiscal series of journal "Sales" when it is posted, but it already has a number that does not come from a series.”
When you import a file with the number and journal columns, with the Test or Import button:
“Error at row 1: "A document of certified journal "Sales" cannot be created with a number: the number is assigned by the fiscal series when it is posted."”
In an integration that tries to create the invoice already posted:
“A document of a Portuguese company cannot be created already posted: create it in draft and confirm it.”
Rarely, when confirming:
Pending validation on screen: this last message only appears when two documents of the same series are confirmed at the same instant, which cannot be triggered from the demo screen. The text is the product's.“Series "…" is in use by another document being posted at the same time. Try again in a moment.”
The parts in italics change with the document. The first three messages were triggered in the demo database: the 1st with the Billing profile, the 2nd in an import done by the administrator and the 3rd by an integration with the Billing profile user.
Verified causes
- The import brought the number but not the journal. A file with the number column (Number) and without the journal column is accepted: the invoice stays in draft, in the default certified journal (Sales), already with the number from the file. The refusal only appears on Confirm. In the demo, the file with the number
FT IMP26/3and a line of [KIT-CAN] Kit de canetas was imported with “1 records successfully imported”. - The import brought the number and the journal. fiscaldoo refuses the row right at import (2nd message) and creates nothing.
- An external program tried to create the invoice with a number or already posted. An already posted invoice is always refused. An invoice with a number is refused when the program states the journal; if it does not, it stays in draft with the number, and the refusal only appears on confirmation (the 1st case). In the demo, the refusals were given without creating any document, and a request with a number and without a journal created the draft
FT XPTO/2, deleted afterwards. - Two confirmations at the same time in the same series. The second waits for the first and, if it cannot proceed, is refused (4th message).
A state column with the posted value (posted) posts nothing: in the demo, the invoice imported that way stayed in Draft, without a number and without a warning.
What to check
-
The number at the top of the draft invoice, under Customer Invoice. An invoice that will be numbered by the series shows Draft; if it shows a number, that number came from the file or was typed by hand.
-
Where the invoice came from. If it is a new sale that was never invoiced, follow the first case in “How to fix it”. If it is an invoice already issued in another program, follow the second.
-
Who can import. Importing invoices requires the Fiscal Migration / Import permission (or system administrator). In the demo, the Billing, Accountant and Fiscal officer profiles received, on the Test button:
“You do not have permission to load fiscal records from a file: the “Fiscal Migration / Import, or system administrator” permission is required, which your user does not have. Official submissions and exports are limited to the people the company has authorised for them. Ask a fiscal administrator to give you that permission, or ask someone who has it to do it for you.”
How to fix it
The invoice is for a new sale: remove the number and confirm
With the Billing profile (or another that issues invoices):
- Open Billing › Invoice › Customer invoices and the draft invoice with a number.
- Click the number, at the top of the invoice, and delete all of it, until the field is empty.
- Click Save manually (the cloud icon, next to the invoice name). The top now shows Draft.
- Check the customer, the date and the lines.
- Click Confirm. The journal's series gives the number, the ATCUD and the signature.
In the demo, the invoice imported with the number FT IMP26/1 for Papelaria Exemplo, Lda (with a line of 1 × Kit de canetas at €10.00 + VAT 23 %, added in the draft) became, after these steps, FT D26/47, with ATCUD DEMOFT2026-47, €12.30. The journal entries are those of any invoice (checked in the ledger):
| Account | Debit | Credit |
|---|---|---|
| 2111 Clientes gerais | €12.30 | |
| 711 Mercadorias | €10.00 | |
| 2433 IVA - Liquidado | €2.30 |
When you correct the file for the next imports, remove the number column: fiscaldoo numbers each invoice when it is confirmed. How to issue the invoice is in How to issue a certified invoice.
Who does it: whoever issues invoices (Billing profile or higher).
The invoice was already issued in another program: do not confirm it
- Do not click Confirm.
- Delete the draft: on the invoice, open the Actions menu (the three dots next to the invoice name), click Delete and, in the Bye-bye, record! window, Delete. In the demo, Billing deleted the draft
FT IMP26/3this way, without using any number from the series. - Talk to whoever is doing the migration and to the certified accountant before importing again. Certified documents from another program have their own screen, Accounting › Configure › Migration and imports › Certified documents migration: the administrator sees “The migrations of certified documents from another system appear here; create one with New, choosing the file to import.”; the Certified Accountant / Fiscal Manager sees the list, without New.
Who does it: whoever imported the invoice, with the certified accountant.
The integration was refused
Fix the program that sends the invoices: it must create them in draft, without a number and without the posted state, and confirm them afterwards, as is done on screen. Nothing was created with the refusal, so there is nothing to delete in fiscaldoo. If the program sent the invoice with a number but without a journal, it was created in draft with that number: handle it as in the first case.
Who does it: whoever maintains the integration (support or partner).
The series was being used at the same time
Wait a few seconds and click Confirm again. The invoice is still in draft and has lost nothing.
Who does it: whoever was issuing the invoice.
Expected result
- The invoice is Posted, with the number from the journal's series (in the example,
FT D26/47) and the ATCUD. - The next import, without the number column, creates drafts that show Draft at the top.
- No sale invoiced in another program was issued again.
When to contact support
- You deleted the number, saved, and the invoice still shows a number at the top.
- The series message “in use by another document” repeats for several minutes.
- You need to bring in invoices issued in another program and do not know where to start.
Information to send
- The full message, copied from the window or the import screen.
- The number the invoice shows at the top, and the journal.
- Whether the invoice came from an import (and the file's columns, without customer data) or from an integration.
- The company and the profile you logged in with.