Feature Requests
Share ideas, discuss and vote on requests from other users in community

Prevent invoices from being changed

Fredrik G shared this idea 6 years ago

Once an invoice has been "issued" accounting practice in some countries does not allow for the invoice to be modified.

I know from a technical perspective that it's almost always possible to change a invoice as long as it's stored electronically, however lawmakers are not technical people and certain leeway is generally accepted in the implementation of this law. Usually the legal system accepts as a good enough solution a system that does not facilitate the change, even if it does not make it completely impossible.

Today's implementation of invoicing in WHMCS however does not just facilitate the changing of sent invoices, it actually makes it itself. Client data needs to be stored with the invoice data, today the invoice data just points to the client ID, if the client data is changed then so is the invoice data for historical invoices. This is not ok.

The usual implementation is system is to have a "invoice sent to client flag" and once that is set the invoice is saved in it's total and can not be changed easily though the system. Some system enables you to "uncheck" the flag and then change the invoice.

I know there are some workaround for this by saving the PDFs of the invoices in a 3rd place or by using the fixed PDF data plugin available as a addon, but they are workarounds and does not solve the basic problem in the system.

Comments (20)


Please consider it for inclusion in the next update or at least within a reasonable time. The reason can be found on https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32006L0112

(look for Article 246 and then especially look at "In respect of the

invoices referred to in the second subparagraph of Article 233(1), the

details they contain may not be altered and must remain legible

throughout the storage period."). Is there a full list available of all

situations where WHMCS alters invoices without an admin doing it?


this wont happen eher in whmcs.

resons is, whmcs is badly structured, to a point where we face a dead end.

problem is that everythign relys on altering invoices in the past.

for example, transaction fees, or domains that wiont be renewed and expire (domains will then be deleted from invoices)

even worse for the dependence on invoices - prodcuts and renew cycles are actually linked to the invoice !!!

thats pure insanity, sorry dev team but it is what it is.

normaly, you would track everything related to a service within the service record.

but for some reason someone decided to instead track it within the invoices., at least some things related to autorenew domains on payment

to change all that would mean a huge rewrite of large junks of the program. very large junks.

but then a lot of addon devolper would scream cause aloen that invocie mess is subject to a dozent addons.

whmcs is the only programm that has an audit addon to track changes and lsot invoices, thats pure insity for a billing program. seriously... you had one job......

no whmcs is an automation tool, its a selling tool, its not a billing tool.

and peopel scream for changes over at least 4 years (what ive seen in the forums)

so i gave up on that

right now im evoluating other options cause i cant work like this ever


To all of you who are upvoting this request, please note that issued invoices are changed also by enabling or disabling auto renew for domains. This is far more dangerous because it is not easy to detect.

What happens if you have 2 items on an invoice issued to a client and one item is a domain renewal? Now, client disables auto renew. WHCMS kills (deletes) the line item in the already issued invoice. That is totally illegal (in my jurisdiction)

If there is only one line item for the domain renewal, the invoice will only be marked cancelled but NOT deleted. This is ok, we use invoice status only for information and issue automatic correction invoices (which are refunds) in that case. No problem with that so far.

But silently killing single line items (with no possibility at all to catch them before deletion) is worse.

As a workaround I disabled the auto renewal settings for the client in our template and replaced this with a message, that client should contact support to cancel a domain.

Writing that, I now fear what will happen if there are 2 products invoiced and client cancel one of those before due date. I will need to check and try that, but I think the same bad thing happens and one line item will be deleted.

So I would highly appreciate an option that prevents invoice manipulation post issued.


I made a short investigation about this with a friend at PWC and even in England this behaviour isn´t legal. If you need to change an invoice you need to issue debt notes or credit notes, the regulations are nearly the same as in Germany. So you simply can´t just delete invoice items. In England you need to add the original invoice number to the credit note and the date of the original invoice. Nearly the same as in Germany, but we also need to declare for which item the credit note ("correction invoice") is issued.

Currently if an invoice is cancelled, we use a hook to detect that and when the invoice is unpaid, we automatically issue a refund/credit note/correction invoice. That´s ok for us. But if we have more than 1 item and the item in question is simply deleted, we have no chance to be aware of it, right? Or does anybody know a possibility to detect and correct?

Invoicing the way it is, may be ok for proforma invoicing, but we need to get a FAST solution if used with real invoicing.

As a developer I have an imagination what that means for the dev team. Sleepless nights. This will not be an easy task and means to say goodbye to product/automation/invoice linking and go straight to credit/debit notes handling with even more work to invest into automation handling.

I´m willing to contribute a workaround module to the community, if we at least get a chance to catch the deleted items when deletion occurs. Currently investigating how this can be done in detail.

But please consider this request and take it as serious as it is.