Rectifying an invoice or a ticket and configuring its numbering

How to rectify an invoice or ticket already issued from the order, what the rectification pattern is and what to do when Lueira asks you to create it.

On this page
  1. What this guide solves
  2. Before you start: the rectification pattern
  3. Option A: when you rectify (the most convenient)
  4. Option B: beforehand, from Settings
  5. How to rectify an invoice or a ticket
  6. What happens after rectifying
  7. What rectifying does NOT do
  8. What to do if…
  9. …I can't find the Rectify button
  10. …Lueira asks me for a rectification pattern
  11. …I can't choose the date I want
  12. …I want the numbering not to reset every year
  13. …I made a mistake when rectifying
  14. Related articles

What this guide solves

When you make a mistake on an invoice or ticket you have already issued (an amount, a customer, a line item), it is not edited or deleted: it is rectified. Lueira generates a new document, with the same data as the original but with the amounts in negative, and links it to the original so that the numbering stays sequential.

This guide explains:

  • how to rectify a document from the order;

  • what the rectification pattern is and why Lueira asks you for it the first time;

  • what happens to the original document, to the payments and to the numbering after rectifying.

💡 The short answer: open the order, click Rectify in the Invoicing block and, if it is the first time, create the numbering pattern for rectifying documents when Lueira asks you.

Before you start: the rectification pattern

Each document type has its own numbering, which is configured in Settings > Document numbering. Rectifying documents do not share the invoice numbering: they have their own type (Rectifying invoice and Rectifying ticket) and their own pattern.

List of Document numbering patterns with Tickets, Proforma invoice, Quotes, Invoices and Rectifying invoices

If you have never rectified before, your account has no rectification pattern. You can create it in two ways:

Option A: when you rectify (the most convenient)

When you click Rectify for the first time, Lueira shows you the Configure rectification pattern window and lets you create the pattern right there. You will see it in the next step.

Option B: beforehand, from Settings

  1. Go to Settings > Document numbering and click Add numbering pattern.

  2. In Document type choose Rectifying invoice (or Rectifying ticket).

Document type dropdown with Invoice, Rectifying invoice, Ticket, Rectifying ticket, Quote and Proforma
  1. Type the Name (for example, "Rectifying invoices"), the Pattern (for example, R[YYYY][XXXX], which generates R20260001, R20260002…) and the Next number.

  2. Save. Then, edit the Invoices pattern and choose this pattern in the Rectification pattern field.

Add numbering pattern window with the fields Name, Document type, Pattern, Next number, Continuous numbering and Rectification pattern

📌 How a pattern is written:

  • [X], [XX], [XXX]… is the sequential number: F[XXX] gives F001, F002…

  • [YYYY] or [YY] inserts the year automatically.

  • Next number is the number that will be assigned to the next document. In the list of patterns you will always see which one is next.

  • Continuous numbering: if you use the year in the pattern, the numbering starts again at 1 every 1 January. Turn this switch on if you do not want it to reset. More information in Managing document numbering at the turn of the year.

How to rectify an invoice or a ticket

  1. Open the order from Orders (or from Orders > Documents, by clicking its reference).

  2. In the right-hand column, in the Invoicing block, find the document and click Rectify.

Invoicing block of an order with the Download, Facturae, Send, Print and Rectify buttons

  1. If it is the first time, Configure rectification pattern appears: "This document's numbering pattern has no associated rectification pattern. Select an existing one or create a new one to continue".

Empty Configure rectification pattern window
  1. Fill in the Name, the Format (for example, R[YYYY][XXXX]) and the Next number (normally 1) and click Confirm and continue. If you already have a rectification pattern, this window does not appear and you go straight to the next step.

Rectification pattern window filled in with Rectifying invoices and R[YYYY][XXXX]
  1. Lueira shows you the preview of the rectifying invoice: the new number, the number of the original invoice and the total in negative. Choose the Rectification date: it cannot be earlier than the date of the original document or later than today.

  2. Click Rectify.

Rectify document window with the negative preview and the date selector

⚠️ This action cannot be undone. Lueira warns you in the window itself. Check the preview before confirming.

Tickets are rectified in the same way; their pattern is of type Rectifying ticket.

What happens after rectifying

In the order's Invoicing block you now see:

  • the original document marked in red as Rectified, without the Rectify button (a document can only be rectified once);

  • below it, the rectifying invoice with its number (for example, 1 | R20260001), with the Download and Print buttons.

Invoicing block with the original invoice marked as Rectified and the rectifying invoice below

In Settings > Document numbering, the rectifying invoices pattern moves on to the next number.

What rectifying does NOT do

  • It does not refund the customer. The rectifying invoice cancels the document, but it does not touch the order's payments. If the customer has already paid and you want to refund the amount, use Refund in the order's Payments block.

  • It does not correct the original document: it generates a new one in negative. If what you want is to issue the correct invoice, issue a new invoice afterwards with the + button of the Invoicing block.

What to do if…

…I can't find the Rectify button

The button is in the order's Invoicing block, next to each issued invoice or ticket. It does not appear if the document has already been rectified (you will see the Rectified mark and the rectifying invoice below it). If what you are looking for is a document you have not issued yet, it must first be issued with the + button of that same block.

…Lueira asks me for a rectification pattern

This is normal the first time: your account does not yet have numbering for rectifying documents. Create the pattern in that window (name, format such as R[YYYY][XXXX] and next number 1) and continue with the process. Later documents will use that pattern automatically.

…I can't choose the date I want

The date of the rectifying invoice cannot be earlier than that of the original document or later than today.

…I want the numbering not to reset every year

Edit the pattern in Settings > Document numbering and turn on Continuous numbering. Without it, a pattern with the year ([YYYY]) starts again at 1 on 1 January.

…I made a mistake when rectifying

A rectification cannot be undone. Contact Lueira support from the help chat, giving the order reference and the number of the rectifying invoice, and we will tell you how to proceed.

🔒 Important: if you write to support, do not include passwords, signing keys or your bank details in the chat; we do not need them to help you with this topic.