@@ 1810-1815 (lines=6) @@ | ||
1807 | $this->session->set_userdata('invoice_list_search', ""); |
|
1808 | } |
|
1809 | /**============ From below code developed for ASTPP version 2.0 ======================================**/ |
|
1810 | function generate_receipt($accountid,$amount,$accountinfo,$last_invoice_ID,$invoice_prefix,$due_date){ |
|
1811 | $invoice_data = array("accountid"=>$accountid,"invoice_prefix" =>$invoice_prefix,"invoiceid"=>'0000'.$last_invoice_ID,"reseller_id"=>$accountinfo['reseller_id'],"invoice_date"=>gmdate("Y-m-d H:i:s"),"from_date"=> gmdate("Y-m-d H:i:s"),"to_date"=>gmdate("Y-m-d H:i:s"),"due_date"=>$due_date,"status"=>1,"balance"=>$accountinfo['balance'],"amount"=>$amount,"type"=>'R',"confirm"=>'1'); |
|
1812 | $this->db->insert("invoices",$invoice_data); |
|
1813 | $invoiceid = $this->db->insert_id(); |
|
1814 | return $invoiceid; |
|
1815 | } |
|
1816 | function insert_invoice_total_data($invoiceid,$sub_total,$sort_order){ |
|
1817 | $invoice_total_arr = array("invoiceid"=>$invoiceid,"sort_order"=>$sort_order, |
|
1818 | "value"=>$sub_total, "title"=>"Sub Total","text"=>"Sub Total","class"=>"1"); |
@@ 322-327 (lines=6) @@ | ||
319 | * @param integer $last_invoice_ID |
|
320 | * @param string $due_date |
|
321 | */ |
|
322 | function generate_receipt($accountid,$amount,$accountinfo,$last_invoice_ID,$invoice_prefix,$due_date){ |
|
323 | $invoice_data = array("accountid"=>$accountid,"invoice_prefix" =>$invoice_prefix,"invoiceid"=>'0000'.$last_invoice_ID,"reseller_id"=>$accountinfo['reseller_id'],"invoice_date"=>gmdate("Y-m-d H:i:s"),"from_date"=> gmdate("Y-m-d H:i:s"),"to_date"=>gmdate("Y-m-d H:i:s"),"due_date"=>$due_date,"status"=>1,"balance"=>$accountinfo['balance'],"amount"=>$amount,"type"=>'R',"confirm"=>'1'); |
|
324 | $this->db->insert("invoices",$invoice_data); |
|
325 | $invoiceid = $this->db->insert_id(); |
|
326 | return $invoiceid; |
|
327 | } |
|
328 | ||
329 | function get_language_text(){ |
|
330 | // echo '<pre>'; print_r($_POST); exit; |