How to enter a purchase invoice by reading its QR code
What is it for?
Portuguese invoices carry a QR code with the issuer, the buyer, the date, the number, the ATCUD and the amounts per VAT rate. The Copilot reads that code in the PDF or photo of the invoice and prepares a supplier invoice draft, without you typing anything. This reading does not use artificial intelligence: it reads the code, so it does not send the invoice to any external provider. The Copilot never confirms: the draft is yours.
When to use it?
- You received a supplier's invoice as a PDF or a photo and want the draft already filled in with the supplier, the date, the reference, and the base and VAT per rate.
- You have several invoices to enter at once.
If the invoice has no QR code (for example, it comes from a foreign supplier) or if you prefer to read documents with artificial intelligence, see How to enter a supplier invoice. For invoices already in e-Fatura, see How to import invoices from e-Fatura.
Where to find it?
- In Accounting › Home (What is there to do?), the Load bill (PDF, photo or QR) button.
- In the Supplier invoices list, the same Load bill (PDF, photo or QR) button, for the same two profiles.
Before you start
- The Copilot and the Supplier bills from the QR code switch must be on for the company, in Copilot › Control › Switches. Only the Fiscal administration profile turns them on: one by one, or all the “Safe” ones at once with the Turn on the essentials button, which answers “Copilot. The essentials are on for "Empresa Demonstração, Lda": 6 switches. The ones that talk to the outside stay off.” These switches are “Safe”: they send nothing outside, unlike the artificial intelligence ones, which stay off.
- The button only appears to the Accountant and the Certified Accountant / Fiscal Manager: the Auditor can only consult, and Billing and Worker have no access to this window.
- Reading PDFs and photos depends on the
zxing-cpplibrary on the server; without it the window says images cannot be read and asks you to paste the text. - The PDF or photo must show the whole QR code. If your phone's reader gives you the code's text (it starts with
A:), you can paste it instead of the file. - Check which company you are in: the QR code's buyer is compared with that company's tax number (NIF).
How to use it
- In Accounting › Home, click Load bill (PDF, photo or QR). If the switches are off, the window says “O leitor de faturas está desligado, por isso por agora não se lê nada” (the invoice reader is off, so nothing is read for now) and says who turns them on; ask for it and come back to this step.
- Drag the files onto PDF or photos of the invoices (or choose them). You can add several. In the example, five fictitious PDFs from an equipment supplier.
- Click Read the QR codes. The window says what it did with each file: “draft prepared”, “WITH A WARNING, check it” or why it did nothing.
- Click Open the drafts. Each invoice is a supplier invoice draft, with the file attached.
- Open the draft and check what was read. The What the Copilot read tab keeps the Copilot invoice key (
NIF do emitente|tipo|número|ATCUD) and the text read: supplier, number, date, ATCUD, and the base and VAT per rate. - In Invoice Lines, check the line. The Copilot creates one line per VAT rate, with the description “Base à taxa normal (Continente, lida do código QR)” (base at the normal rate, mainland, read from the QR code), the price (200,00 €), the
23%tax and an account it chooses. The QR code does not say what was bought: the account is the one the supplier already had on its invoices, so change it if it is not the right one. - Click Confirm. In the example we changed the account to
6233 Material de escritório(the QR came from a desk lamp). The invoice becomes Posted with numberFTF/2026/00062.
Expected result
- One draft per invoice read, never a confirmed invoice. The supplier comes from the issuer's NIF, the reference is the document number and the date is the invoice date.
- When you confirm the example invoice (200,00 € + 46,00 € VAT), the entry is that of a purchase invoice, and the demo company has a 96 % pro rata (the Deductible column on the line; see How to calculate and adjust the pro rata):
| Account | Debit | Credit |
|---|---|---|
6233 Material de escritório | 200,00 € | |
6233 Material de escritório (non-deductible VAT, art. 23) | 1,84 € | |
2432 IVA - Dedutível | 44,16 € | |
2211 Fornecedores gerais | 246,00 € |
Besides these, the ledger has two lines of 8,00 € (one debit and one credit) that cancel each other out, on the expense account (the “parte privada” of the partial deduction). The same invoice without pro rata would only have the 200,00 € expense, the 46,00 € VAT and the 246,00 € supplier balance.
Important notes
The Copilot's warnings
The result window says WITH A WARNING, check it, and the draft shows a yellow banner “The Copilot has a warning about this draft. Read "What the Copilot read" in the tab below before confirming.” The warnings tested:
- Buyer different from the company. “WARNING: the buyer of the invoice has NIF 501000054 and the company has NIF 509999999. It may belong to another company: check before using it.”
- Invoice to a final consumer. “WARNING: the invoice was issued to “final consumer” (without a NIF), not to the company (NIF 509999999). The VAT may not be deductible: ask the supplier to correct it.”
A draft with one of these two warnings cannot be confirmed with Confirm: the Confirm the buyer button appears (it asks for confirmation and the chatter records who gave it) and only then does Confirm work. If the invoice does not belong to the company, do not confirm it: ask the supplier for an invoice with your NIF.
Pending validation by a certified accountant: deduction of VAT on an invoice issued to a final consumer or to another NIF (VAT Code (CIVA), art. 19 and 20) and when the supplier must be asked to correct it. The Copilot blocks confirmation until someone confirms the buyer, but it does not decide whether the VAT is deductible.Supplier that does not exist yet
If there is no contact with the issuer's NIF, the Copilot creates one named “Fornecedor NIF 599999985” and writes in What the Copilot read: “There was no contact with NIF 599999985: the Copilot created the supplier “Fornecedor NIF 599999985”. Complete its name and data.” The draft's account comes as 6228 Outros. The QR does not carry the name, so open the supplier and complete it before paying. If the issuer's NIF is not valid, the Copilot does not create the supplier: “The NIF of the issuer (504000099) is not valid, so the supplier could not be created. Check the document and create the draft by hand.”
File without a QR code
A PDF where the code cannot be seen is not refused: the window says “no QR code of a Portuguese invoice was read from this file, so nothing was filled in from a QR code. The draft was created with the file attached and already has what the other readers found in it (…): check it and fill in the rest by hand.” The draft has a banner “This bill was filled in from a PDF. Check the supplier, the date, the amounts and the VAT against the PDF, then press "Confirm the review". Until then it cannot be confirmed.” It has no lines, and on the test screen it brought the supplier and the reference: check everything against the PDF.
Duplicate invoice
The same invoice cannot be loaded twice. If you repeat the file, the window says “refused, this invoice (same issuer and ATCUD) is already in the accounting as Rascunho de fatura de fornecedor (FT AB2026/0123). Nothing was created.” With the code's text pasted, it says “The Copilot did not load it again and removes this empty draft by itself.”
The account and the fixed asset
The account the Copilot proposes comes from the supplier's history. If it is a fixed asset account (43, 44 or 45), the asset card is created when you confirm the invoice: see How to create the asset from the invoice. If the item is not an asset, change the account before confirming.
Common problems
“The invoice reader is off”
- Symptom: when you click Read the QR codes, an Invalid Operation window: “The Copilot is turned off for company "…". Nothing was done. Only the Fiscal administration profile can turn on the Copilot and this agent: ask someone with that profile.”
- Cause: the Copilot's master switch or the Supplier bills from the QR code switch is off for the company you are in.
- What to do: ask Fiscal administration to turn them on in Copilot › Control › Switches (each company has its own). This button never turns them on by itself.
“The text is not the QR code of a Portuguese invoice”
- Symptom: when you paste text in Ou o texto de um código QR? (or the text of a QR code?), an Invalid Operation window: “The text is not the QR code of a Portuguese invoice (não começa por A: ou não tem o campo do adquirente (B:)). Copy the whole text, starting with A:, and try again.”
- Cause: the pasted text does not start with
A:or does not have the buyer field (B:). - What to do: copy the whole text from the QR reader, from
A:to the end.
The draft has no lines or the account is wrong
- Cause: the file had no readable QR code, or the proposed account comes from the supplier's history.
- What to do: fill in the lines by hand (click Confirm the review when the draft comes from a PDF without a QR) or change the account.