Topic: Invoice Editable

The Invoice in FA as a whole is not editable. Specially in case of sales of components (inventory items) it is not recommended to make invoice editable. But in case of sales of Service Items following option shall be considerable.

When we click the EditInvoice Icon on Customer Transaction Inquiry page it shall open following document with following parameters.

http://localhost/bx242/sales/sales_order_entry.php?NewInvoice=72&InvoiceNo=70

Where NewInvoice refers to the Auto Sales Order of the Invoice No 70.

While processing this document the system shall check the InvoiceNo parameter and execute the Void Routine to void the previous invoice.

This Edit option shall be available to 2 type of companies

1. Total Service Based Company. A check can be added in company setup.
2. A Company selling components but has enabled Negative Inventory in Setup.

I couldn't code it completely so if admin can consider it then it will be a good solution to all FA Users

Regards.

www.boxygen.pk

Re: Invoice Editable

I am not really understand with what you mean. If you want to ask detail, please send PM to me.

Re: Invoice Editable

Thanks I have done it. I have made Invoice Editable. When an Invoice is edited and processed the old invoice is automatically voided and new invoice is created with the same Reference Number.

www.boxygen.pk

Re: Invoice Editable

@joe: is this desirable in the default FA?

Re: Invoice Editable

No, I don' t think so. In the core we should not allow full editing. It sends a wrong signal. I would leave it as is.

Joe

Re: Invoice Editable

@joe: I agree.
@boxygen: Zip, upload and paste link to changed files for this "feature" so that it can become an extension someday and be available for reference.

Re: Invoice Editable

Sure I will

www.boxygen.pk

Re: Invoice Editable

@apmuthu Here is the extension Invoice Editable

Regards.

Post's attachments

FA_Inv_editable_boxygen.zip 18.2 kb, 72 downloads since 2017-10-21 

You don't have the permssions to download the attachments of this post.
www.boxygen.pk

Re: Invoice Editable

I have updated so please update the attachment as well

www.boxygen.pk

Re: Invoice Editable

Updated.

The diff of your new file added as compared to the stock FA 2.4.2+ master apart from whitespace changes are::

--- sales/includes/ui/sales_order_ui.inc    Sun May 21 21:49:30 2017
+++ sales/includes/ui/sales_order_ui.inc    Sat Oct 21 22:32:51 2017
@@ -236,6 +236,10 @@
         display_note(_("Marked items have insufficient quantities in stock as on day of delivery."), 0, 1, "class='stockmankofg'");
 
     div_end();
+
+        if(list_updated('stock_id')) //added by faisal phuong
+            set_focus('stock_id');
+
 }
 
 // ------------------------------------------------------------------------------
@@ -265,6 +269,9 @@
     else
     {
         customer_list_row(_("Customer:"), 'customer_id', null, false, true, false, true);
+        If (isset($_GET['InvoiceNo']))
+            hidden('InvoiceNo', $_GET['InvoiceNo']); //Added by Faisal for Invoice Edit
+            
 
         if ($order->customer_id != get_post('customer_id', -1))
         {

Re: Invoice Editable

How do you get this difference file?

www.boxygen.pk

Re: Invoice Editable

You can use tools like WinMerge.

Re: Invoice Editable

I think this can be useful, I had to edit invoice a few times.
Thank you for sharing!

Re: Invoice Editable

Dear Members,

1. Can the FA generate a Invoice, with all the details of the organisation and address etc.

2. How do I create a Tax Invoice with 18% and 28% Indian GST rates in FA system and also make modification when the rates change? I need to print the same Invoices with all the organisation information for the purpose of Audit. Pls help and advice.

regards,
Sandeep
Sandeepleo1@gmail.com

Re: Invoice Editable

So 2 of our clients use SAP. Ideally according to their process:

1) there should be a proforma invoice from our side (in FA) indicating approximate price
2) We supply a commodity which has variable quantity and variable rates on a daily basis (agri commodities)
3) Based on the delivery, our clients generate a GRN and then a backdated PO in their SAP. The GRN carries the invoice number which ideally should have been shipped along with the material (agri commodity)

Now because of the stupid implementation of the SAP system...
4) Based on proforma invoice, using Proforma Invoice number they generate the GRN
5) Our final invoice should then carry the final amount, final quantity, final rates, the invoice number as depicted in proforma invoice  , etc.

Due to the low margin nature of the business, we can not afford to hire too many people to handle the process heavy nature. And, we supply from many locations.

What we do:
So we end up giving series of invoice numbers to these 2 clients i.e. <ourName>/17-18/Client1/Location1/<Invoice Series> and <ourName>/17-18/Client1/Location2/<Invoice Series>. The client accounts team knows which number is going to come next. So they generate GRNs against invoice numbers (invoices which we make later). All we need to do is make invoices. Process is simple.

We have still not evaluated FA completely yet. However, if we can not define series client wise and location wise in invoice numbers... then "Invoice Editable" sounds like a good idea.

Re: Invoice Editable

FA has just 1 series for each Voucher Type. A default Prefix can be used. The same number of characters must be in the final invoice number and it is editable. It will be preferable to have the same running number but with different prefixes to identify the Client/Location pair. Since both Client and Location are available in the transaction detail, a well crafted sql will be able to report when grouped by accordingly so as to remain within FA's single numbering series for all sales.

Re: Invoice Editable

can you help me to add this extension in last version FA
now its not work

Re: Invoice Editable

It should work. I have it working on 2.4.10 latest without any problem. It s installed as any other extension. One thing thing you will notice is that it does not show as an extension because it replaces the some core Sales programs. So to see if it is installed and after giving the right permissions just go into Customer Transaction --> Sales Invoices and choose one and try to edit it.

Re: Invoice Editable

@ Bozygen
I used the Invoice extension that you modified and put them in the Sales Folder. but this is the error I get.

Warning: include_once(../../sales/includes/cart_class.inc): failed to open stream: No such file or directory in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 23

Warning: include_once(): Failed opening '../../sales/includes/cart_class.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 23

Warning: include_once(../../includes/session.inc): failed to open stream: No such file or directory in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 24

Warning: include_once(): Failed opening '../../includes/session.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 24

Warning: include_once(../../sales/includes/sales_ui.inc): failed to open stream: No such file or directory in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 25

Warning: include_once(): Failed opening '../../sales/includes/sales_ui.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 25

Warning: include_once(../../modules/editable/includes/sales_order_ui.inc): failed to open stream: No such file or directory in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 26

Warning: include_once(): Failed opening '../../modules/editable/includes/sales_order_ui.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 26

Warning: include_once(../../sales/includes/sales_db.inc): failed to open stream: No such file or directory in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 27

Warning: include_once(): Failed opening '../../sales/includes/sales_db.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 27

Warning: include_once(../../sales/includes/db/sales_types_db.inc): failed to open stream: No such file or directory in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 28

Warning: include_once(): Failed opening '../../sales/includes/db/sales_types_db.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 28

Warning: include_once(../../reporting/includes/reporting.inc): failed to open stream: No such file or directory in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 29

Warning: include_once(): Failed opening '../../reporting/includes/reporting.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 29

Warning: include_once(../../modules/editable/includes/addon.inc): failed to open stream: No such file or directory in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 30

Warning: include_once(): Failed opening '../../modules/editable/includes/addon.inc' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 30

Fatal error: Call to undefined function set_page_security() in C:\xampp\htdocs\frontaccount\sales\sales_order_entry.php on line 33

Kindly help out. how do I correct this?

thanks.

Popsicles12

Re: Invoice Editable

You shall put that in the modules folder and then install that extension

www.boxygen.pk

Re: Invoice Editable

Hello @Boxgen

Thanks for the solution. I placed it in the extension folder and I have installed it.

How does it work cos i tried editing previous invoices price and products but it has no option of editing as the price field and the product cost field is grey out.

Please assist.

Thanks

Popsicles12

Re: Invoice Editable

Review your installation and make sure that the extension is activated to the company that you want to use it for.

Re: Invoice Editable

thanks Rafat.

I have installed and activated it for the company and the price is still not editable. What am I missing out?

thanks.

waiting for your response.

Popsicles12

Re: Invoice Editable

One thing to remember this extension works for Direct Invoices ONLY.
If this is your case pls see the errors.log for any errors.