# I can't delete an invoice or reuse its number: what to do

> Why an issued invoice still exists after you delete the order, and how to correct it with a credit note or avoid it with proformas.

## I can't delete an invoice or reuse its number

You issued an invoice or a simplified invoice, deleted it (for example by deleting the order), and now Lueira won't let you use that number again, or you see gaps in your numbering. This is intentional. Here is why, and what to do.

### 1. Why it happens

- An **issued** invoice can't be deleted and its number can't be reused, even if it has not been submitted to the tax authority.
- The regulations require invoice numbering to be **consecutive and without gaps**.
- If you delete the order, **the document remains issued with its number**. It doesn't disappear: that is why the program won't let you use that number again.

This applies equally to ordinary and simplified invoices, and it is the same requirement for any invoicing software.

### 2. How to cancel or correct an issued invoice

The correct way is to issue a **credit note (corrective invoice)**: a new document, linked to the original, with the amounts in negative. Credit notes have their own numbering (for example, FSR for simplified invoices and FR for ordinary ones, depending on your configuration). The steps are in [Correcting an invoice or a ticket and setting up its numbering](lueira-guide:f80bbb23-f185-4e1f-86c6-4ebdf94aa154?locale=en).

### 3. How to avoid it: use proforma invoices

If you are not yet sure the document is correct, use a **proforma invoice**. It has no tax value and is not submitted anywhere, so you can create, edit or delete it as many times as you need. When the document is correct, you issue the final invoice and that is when the number is assigned. See [Invoicing: tickets, invoices and quotes in orders](lueira-guide:5ecb5f2c-1a22-4163-bf33-c2a79ad61477?locale=en).

### 4. I have already deleted orders with an issued invoice

Write to us with the numbers of the affected invoices. We can review your numbering and recover those documents so that you can correct them.

Source: https://help.lueira.com/en/articles/no-puedo-borrar-una-factura-ni-reutilizar-su-numero-que-hacer
