Why can't a validated invoice be edited or deleted?
Once sent, an invoice is recorded by your customer, who may already have deducted the VAT, and it is part of your turnover and your output VAT. Editing it creates two versions of the same document; deleting it leaves a gap in the numbering, which a tax audit spots quickly.
So you do not rewrite the past: you add a document that corrects it, the credit note, called avoir or facture d'avoir in French. The term corrective invoice (facture rectificative) often refers to the same thing: in practice, the correction takes the form of a credit note, followed if needed by a new, correct invoice. Only a draft that was never sent and has no number can be dropped.
Worked example: a partial return and a price error
On 15 September 2026, an IT equipment distributor issues invoice FA-2026-0142 to an SME: 10 monitors at 1,890.00 DH excluding VAT, 4 printers at 3,250.00 DH excluding VAT and an installation of 1,200.00 DH excluding VAT, all at the 20 % rate. Total: 33,100.00 DH excluding VAT, 6,620.00 DH of VAT and 39,720.00 DH including VAT.
Two monitors arrive defective and are returned, and the customer points out that the agreed price of the printers was 3,100.00 DH excluding VAT. On 2 October the distributor issues partial credit note AV-2026-0009, citing invoice FA-2026-0142 of 15 September 2026: 2 monitors × 1,890.00 = 3,780.00 DH and 4 printers × 150.00 = 600.00 DH, i.e. 4,380.00 DH excluding VAT, 876.00 DH of VAT and 5,256.00 DH including VAT. The installation line is unchanged.
If the invoice had not yet been paid, the customer pays 39,720.00 − 5,256.00 = 34,464.00 DH, i.e. 28,720.00 DH excluding VAT and 5,744.00 DH of VAT: exactly the amount of a correct invoice. If it had already paid in full, the distributor refunds 5,256.00 DH or offsets that amount against the next invoice, as agreed. The table below shows the detail line by line.
| Line | Original invoice | Partial credit note | Net amount due |
|---|---|---|---|
| Monitors (1,890.00 DH each excluding VAT) | 10 × 1,890.00 = 18,900.00 | 2 returned: −3,780.00 | 8 × 1,890.00 = 15,120.00 |
| Printers | 4 × 3,250.00 = 13,000.00 | Price corrected by 150.00: −600.00 | 4 × 3,100.00 = 12,400.00 |
| Installation | 1,200.00 | — | 1,200.00 |
| Total excluding VAT | 33,100.00 | −4,380.00 | 28,720.00 |
| VAT 20 % | 6,620.00 | −876.00 | 5,744.00 |
| Total including VAT | 39,720.00 | −5,256.00 | 34,464.00 |
When should you issue a full or partial credit note?
A credit note is needed whenever the amount the customer owes must go down after the invoice has been issued. A full credit note repeats every line of the invoice and cancels it out; if the sale still stands, a new correct invoice follows with a new number. A partial credit note, the most common case, corrects only the lines concerned: the invoice remains payable for the rest.
Two traps: if you invoiced too little, you issue a supplementary invoice, not a credit note; and an unpaid invoice does not justify a credit note, because an unpaid receivable has its own accounting and tax treatment. The situations that justify a credit note are almost always the same:
- Returned goods: defective or unordered items sent back by the customer.
- Discount granted after invoicing, for example for a late delivery.
- End-of-period rebate on volumes bought, often grouped in a single credit note listing the invoices concerned.
- Price or quantity error in the customer's favour, or a line invoiced twice.
- Full cancellation: order cancelled, invoice made out to the wrong customer or with the wrong ICE number, invoice issued twice.
What must a credit note contain in Morocco?
A credit note is a supporting document just like an invoice: it carries the same details, and your customer needs it to correct its books and its input VAT. Have your template reviewed once by your expert-comptable (chartered accountant); in practice, a complete credit note includes:
- The words Credit note (Avoir) clearly displayed.
- A unique number in a sequence reserved for credit notes, chronological and without gaps (for example AV-2026-0009), and the issue date.
- The reference of the original invoice: its number and its date.
- The same identifiers as the invoice: the seller's company name, address, ICE, IF, RC and business tax number; the business customer's name, address and ICE number.
- The lines concerned: description, quantity, unit price excluding VAT and the reason (return, discount, price error, cancellation).
- The VAT rate and VAT amount per rate, then the credit note's totals excluding VAT, VAT and including VAT.
- What happens to the amount: deducted from the original invoice, refunded, or offset against a future invoice.
Refund or offset: what is the effect on VAT and the books?
VAT is calculated on the price actually owed, so a credit note carries VAT at the same rate as the original line; otherwise your output VAT stays overstated. Under the cash basis (encaissement), the default regime, VAT follows the amounts collected: a credit note deducted before payment directly reduces the VAT to declare, while refunding an amount already collected leads to an adjustment on a later return. Under the accrual basis (débits), the VAT declared on invoicing is adjusted after the credit note. Confirm the period and the return line with your accountant.
On the customer's side, the credit note reduces by the same amount the input VAT already deducted on the original invoice. Under the Moroccan CGNC chart of accounts, the credit note in the example, which only concerns goods, reverses the sales entry: debit 7111 Sales of goods (or a sales rebates and discounts account, depending on the treatment chosen) with 4,380.00 DH, debit 4455 State, invoiced VAT with 876.00 DH and credit 3421 Customers with 5,256.00 DH. A refund by bank transfer is then a debit to 3421 Customers and a credit to 5141 Banks.
Which mistakes should you avoid when correcting an invoice?
The same mistakes come up in businesses that correct their invoices by hand, in a spreadsheet or a word processor:
- Editing the invoice directly and sending it again under the same number.
- Deleting a validated invoice, which leaves a gap in the numbering.
- Issuing a credit note without citing the original invoice's number and date.
- Numbering credit notes in the invoice sequence, or not numbering them.
- Issuing the credit note excluding VAT only, without the matching VAT.
- Using a credit note for an under-invoiced amount or to wipe out an unpaid invoice.
How does SOGESTIO handle credit notes?
In SOGESTIO, the credit note is linked to the original invoice. Its number is assigned by the server, per document type and per year: credit notes have their own sequence, with no duplicates. Totals excluding VAT, VAT and including VAT are calculated by the server, with VAT line by line and a summary per rate, and the PDF is generated in French, Arabic or English with your logo, ICE, IF and RC.
The original of every validated invoice is archived with its SHA-256 fingerprint, and the audit log records who did what. SOGESTIO exports validated invoices and credit notes in the structured UBL 2.1 format (with ICE, IF and RC), which prepares the move to the e-invoicing system announced by the DGI. With the Pro and Groupe plans, CGNC accounting entries are generated automatically for every invoice and every payment. Free 14-day trial, no card required.
This guide is for information only and does not replace advice from your accountant or the relevant authority.
Frequently asked questions
Can you cancel an invoice in Morocco?
A validated invoice is not cancelled by deleting it: you issue a full credit note that repeats all its lines and cites its number and date. The numbering stays continuous and the VAT on the transaction is corrected. If the sale still stands, a new correct invoice is then issued.
Must a credit note show VAT?
Yes, when the original invoice included VAT: the credit note uses the same rate on the corrected lines. Otherwise your output VAT would stay too high and your customer could not correct its input VAT.
Do credit notes need separate numbering?
That is the recommended practice: a sequence reserved for credit notes, chronological and without gaps, for example AV-2026-0001, separate from the invoice sequence. Each credit note also cites the number and date of the invoice it corrects.
Should I refund the customer or deduct the credit note from the next invoice?
Both are possible. If the original invoice has not been paid yet, the credit note is deducted from the amount due. If it has been paid, you refund the customer by bank transfer or cheque, or offset the credit note against a future invoice, stating the choice on the credit note.
What if I invoiced less than I should have?
You do not issue a credit note: you issue a supplementary invoice for the difference, citing the original invoice. A credit note is only used to reduce or cancel an amount already invoiced.
How does SOGESTIO handle credit notes?
The credit note is linked to the original invoice, numbered by the server in its own yearly sequence, and its totals are calculated automatically. Validated credit notes are exported, like invoices, in UBL 2.1 format. You can try SOGESTIO free for 14 days, no card required.