statusupdate

This commit is contained in:
gayathri1990 2018-12-14 13:43:56 +05:30
parent 43f60bf263
commit 498c9763b3
2 changed files with 17 additions and 14 deletions

View File

@ -2024,7 +2024,8 @@ class cashbook extends BaseController
$result= $this->cashbook_model->IGRStatusUpdate($igrno,$PaymentStatus); $result= $this->cashbook_model->IGRStatusUpdate($igrno,$PaymentStatus);
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear); $Status=OPEN;
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear,$Status);
//for update mapping amount in t_bankmappingpo table// //for update mapping amount in t_bankmappingpo table//
$balancetopay=$this->input->post('balancetopay'); $balancetopay=$this->input->post('balancetopay');
$totalbalancetopay=$Amount+$balancetopay; $totalbalancetopay=$Amount+$balancetopay;
@ -2081,7 +2082,8 @@ public function Deletemappingpo()
$result= $this->cashbook_model->IGRStatusUpdate($igrno,$PaymentStatus); $result= $this->cashbook_model->IGRStatusUpdate($igrno,$PaymentStatus);
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear); $Status=OPEN;
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear,$Status);
//for update mapping amount in t_bankreport table// //for update mapping amount in t_bankreport table//
$balancetopay=$_GET['balancetopay'];//balancetopay $balancetopay=$_GET['balancetopay'];//balancetopay
$totalbalancetopay=$Amount + $balancetopay; $totalbalancetopay=$Amount + $balancetopay;
@ -2104,6 +2106,7 @@ public function Deletemappingpo()
{ {
$IsAct=1; $IsAct=1;
} }
$result3= $this->cashbook_model->updateBankporeport($igrno,$balancetopayupdate,$amountpaidupdate,$IsAct); $result3= $this->cashbook_model->updateBankporeport($igrno,$balancetopayupdate,$amountpaidupdate,$IsAct);
if(count($result3)>0) if(count($result3)>0)
@ -2142,15 +2145,15 @@ public function Deletemappingpo()
//update Isactive field in T_Bankreport ////// //update Isactive field in T_Bankreport //////
$mapped=$balancetoreceived+$amountreceived; $mapped=$balancetoreceived+$amountreceived;
if($credit==$mapped) // if($credit==$mapped)
{ // {
$active=0; $CStatus=OPEN;
} // }
else // else
{ // {
$active=1; // $active=1;
} // }
$bankstatement=array('cbalancetocleared'=>$updatebalancetoclear,'cclearbalance'=>$updateclearbalance,'IsActive'=>$active); $bankstatement=array('cbalancetocleared'=>$updatebalancetoclear,'cclearbalance'=>$updateclearbalance,'cstatus'=>$CStatus);
$result1= $this->cashbook_model->updatebankreportiv($bankid,$bankstatement); $result1= $this->cashbook_model->updatebankreportiv($bankid,$bankstatement);
@ -2201,7 +2204,6 @@ public function Deletemappingpo()
// } // }
} }
public function Deletemappingcashbook() public function Deletemappingcashbook()
{ {
$bankamount=$_GET['bankamount']; $bankamount=$_GET['bankamount'];

View File

@ -1960,10 +1960,11 @@ function receiptdata()
} }
} }
function deletemapping($Bankid,$updateamount,$updatebalancetoclear) function deletemapping($Bankid,$updateamount,$updatebalancetoclear,$Status)
{ {
$this->db->set('Clearbalance',$updateamount); $this->db->set('Clearbalance',$updateamount);
$this->db->set('Balancetocleared',$updatebalancetoclear); $this->db->set('Balancetocleared',$updatebalancetoclear);
$this->db->set('Status',$Status);
$this->db->where('ID',$Bankid); $this->db->where('ID',$Bankid);
$this->db->update('T_bankreport'); $this->db->update('T_bankreport');
$r = $this->db->affected_rows(); $r = $this->db->affected_rows();