1 (edited by boxygen 12/19/2016 11:17:47 am)

Topic: Adding Recovery On Cash Invoice

I am trying to add a Field Recovery on Cash Invoice. Sometimes while recording a cash invoice we are also receiving some outstanding recovery against previous invoices. I am trying to add a option that payment recorded at Invoice Screen shall create a Customer Payment

<a href="http://prntscr.com/dl88p5">Click Here to View the Screen</a>

Then I added following lines of code in /sales/includes/db/sales_invoice_db.inc on Line 183 onwards

        global $water_business;
        $recovery=100;//$invoice->recovery;
        if ($water_business)
            write_customer_payment(0, $invoice->customer_id,
                $invoice->Branch, $invoice->pos['pos_account'], $date_,
                $Refs->get_next(ST_CUSTPAYMENT), $recovery, 0,
                _('Cash invoice').' '.$invoice_no);


Now I need to know how to pass the value in the Recovery Filed till here. I am not very good at php so I don't know how to change the /sales/includes/cart_class.inc

I also need to save this information in a field recovery in sales_orders table. That I will create a field there.

@apmuthu Can you help me?

2 (edited by apmuthu 12/19/2016 11:56:12 am)

Re: Adding Recovery On Cash Invoice

Make a cash receipt for the amount you want to show in "Recovery" and allocate it to the appropriate partially unpaid invoice. Keep the rest of the cash for the cash invoice allocation.

Re: Adding Recovery On Cash Invoice

The process you suggested is by default process of front accounting but I have a customized need to record a payment without leaving invoice form.

I have added a text box on order entry form and added a custom coded defined above but having issues in calling the recovery text box value in that custom code

Re: Adding Recovery On Cash Invoice

Shipping can be used for the excess and worded so or transferred by JV.