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?