Topic: Need to Edit Sales Invoice


I run a small Services Only Company. I don't have any Inventory .. all my invoices are Services Sales. My customer insists that I should produce a TAX INVOICE before they EVALUATE my claim. So I produce an invoice and 99% of the time they review it and send it back to me for +or- 0.09 difference in the already agreed price before they issue me a payment certificate for me to claim my works. I always VOID the invoice and issue a new one and type the already inputted items again since I do not have the option to edit it. Is there another way around this? Why I cant edit an invoice?

Re: Need to Edit Sales Invoice

Invoice Edit option is available.  But you can't edit the price, here its showing it to alter the quantity only. Which is also retricted certain way.

May be @joe, @janusz can tell you exactly, why they are preventing to edit the invoice.

If you wish to see the edit invoice, take a look at there .

Hope you can change the invoice number and see it. Goodluck

Subscription service based on FA
HRM CRM POS batch Themes

3 (edited by Braath Waate 01/18/2019 01:04:35 pm)

Re: Need to Edit Sales Invoice

Void of a sales invoice does not void the sales order.    You can reuse the same sales order.  You do not have to type the already inputs again (except for quantities: void of a direct invoice (auto generated delivery) clears the quantities in the sales order but the void of a manual invoice does not).

Thus, to edit a sales invoice:

1.  void the invoice.
2.  If the sales invoice was a manual invoice, void the delivery (void of a direct invoice auto-voids the delivery).
3. edit the sales order and process
4. process the delivery
5. process the invoice

On my site, I have a page that does these steps somewhat automatically, thus creating the appearance of being able to edit any invoice.

In summary, FA does not prevent the edit of an invoice.  It just requires more steps.


Re: Need to Edit Sales Invoice

Thanks Braath your instructions works fine for me.. a long way to a small problem,. Can your workaround be implemented as an extension? I do have your FA version and it works ok there.

Re: Need to Edit Sales Invoice

Core changes are needed for the reissue invoice page that I wrote to work because although it is basically a copy of the void page, it then calls the order entry, delivery, and invoice pages and then expects control to be returned back to the calling page rather than continue to the standard completion pages.

So if one were to create an extension without core changes, the extension would have to contain all the code from the void page and these other pages in the extension itself.   It would also need a way of selecting the invoice to be reissued.

However, I prefer the somewhat core-integrated approach that I took, largely because the code is much simpler but also because the link to the reissue page (reissue icon) is on the list of customer transactions inquiry page, making it easy to find.

Re: Need to Edit Sales Invoice

@rafat, A solution to your problem is here

Re: Need to Edit Sales Invoice

@boxygen .. your fork works fine. I actually like it.  I need to test it further.
One thing is it does not show as an extension... although it is. I would like to have it as a separate item on the Sales Maintenance Menu. Is it possible?

Re: Need to Edit Sales Invoice

It actually replaces the current inquiry form. You can change it in hooks.php

Re: Need to Edit Sales Invoice


I like your extension which should work correctly with invoices created by Direct Invoice.   I particularly like your approach of overriding existing FA pages in hooks.php, a technique I had not seen before.

However, I do not think it will work correctly with a manually created invoice, because the void_transaction() call in your sales_order_entry.php does not void the deliveries of this invoice type.

If so, you might want to consider adding code to limit the extension to direct invoices, or void all the deliveries, which is what I did in my code.

Re: Need to Edit Sales Invoice

Yes you are right, it works with direct invoices. We can create an option in the setup to let user decide whether it is good to delete all deliveries or just work for Direct invoices

Re: Need to Edit Sales Invoice

I have been testing your extension and it works for me nicely. One little thing is its not taking the Preferences   Transaction Days and instead its defaulting to the last 30 days. How can this be changed to account for the user preferences of 120 days instead.?

Re: Need to Edit Sales Invoice

Found in



date_cells(_("From:"), 'TransAfterDate', '', null, -30);

date_cells(_("From:"), 'TransAfterDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days());

Re: Need to Edit Sales Invoice

I too am running a small consulting business. All of my sales are for services, not actual physical items. I have not been able to locate a checkbox or setting box in setup|Company Setup to indicate this is strictly a service-based business.

My issue is similiar to the one that startd this conversation, but I've still not be able to find a solid solution. I've created an invoice for two services provided with a set number of hours. I need to go back and reduce the number of hours on the invoice after all was said and done, but I get the error warning:

"You attempting to make the quantity ordered a quantity less than has already been delivered. The quantity delivered cannot be modified retrospectively."

I'm not sure how to resolve this either by the correct settings to NOT have 'inventory' or items 'being delivered' OR to be able to edit an invoice to the corrected number of hours.

I'm hesitant to attempt the patch listed above for now just in case it is something I may have set incorrectly in the company setup.

Re: Need to Edit Sales Invoice

Do not choose to inventorise the items used for service business. There are separate service business Charts (for USA / AU) in the FA24extensions repo.