From dd19057792749ad4b8593d91669720bed4a735ae Mon Sep 17 00:00:00 2001 From: venbatechnologies Date: Wed, 16 May 2018 11:39:08 +0530 Subject: [PATCH] poeditable --- application/controllers/purchaseorder.php | 23 ++++++-------------- application/models/purchaseorder_model.php | 14 ++++++------ application/views/monthlypayinputs.php | 25 ++++++++++++++-------- 3 files changed, 28 insertions(+), 34 deletions(-) diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index c7e3ecd1..7522f2a6 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1345,32 +1345,21 @@ function edited(){ $recqty= $Quantity; - } + $IGRD= $this->purchaseorder_model->IGRDetailsupdate($PONO); - - $IGRItem=0; - $IGRNO=0; - - foreach($IGRD as $value) - { - - - $IGRItemNo=$value['IGRItemNo']; - $IGRNO= $value['IGRNO']; - - } + $j = $i-1; // print_r($IGRD); die; $IGRDs = array('QuantityAsPerInvoice'=>$Quantity,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt); - //print_r($IGRDs);die; - $this->purchaseorder_model->updateIGR($IGRItemNo,$IGRNO,$MaterialCode,$IGRDs); + + $this->purchaseorder_model->updateIGR($IGRD[$j]['IGRItemNo'],$IGRDs); - + } @@ -1404,7 +1393,7 @@ function edited(){ $LineItemNo = $POLineItemNo; - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter); + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'ReceivedQuantity'=>$recqty,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter); //print_r($POLineItemList); diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index aecfa00d..99255d3f 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -57,20 +57,18 @@ Where IGRM.PONO = ? '; } - function updateIGR($IGRItemNo,$IGRNO,$MaterialCode,$IGRDs) + function updateIGR($IGRItemNo,$IGRDs) //,$MaterialCode, { + //print_r(array($IGRDs,$IGRItemNo)); -// echo $IGRItemNo; -// echo $IGRNO; -// die(); - $this->db->where('IGRItemNo',$IGRItemNo); - $this->db->where('IGRNO',$IGRNO); - $this->db->where('MaterialCode',$MaterialCode); + $this->db->where('IGRItemNo',$IGRItemNo); //,'IGRNO',$IGRNO,'MaterialCode',$MaterialCode); + //$this->db->where('IGRNO',$IGRNO); + // $this->db->where('MaterialCode',$MaterialCode); $this->db->update('T_IGR_Details',$IGRDs); $r = $this->db->affected_rows(); - // print_r( $this->db->last_query()); + // $this->db->last_query(); return $r; diff --git a/application/views/monthlypayinputs.php b/application/views/monthlypayinputs.php index 798a5103..94671cf9 100755 --- a/application/views/monthlypayinputs.php +++ b/application/views/monthlypayinputs.php @@ -199,6 +199,7 @@ $('html').bind('keypress', function(e) //print_r($sample); $index = 0; $i = 0; + $totalempSal = []; foreach($sample as $i=> $record) { //echo 'PAY'.$record->Key; @@ -270,7 +271,7 @@ $('html').bind('keypress', function(e) - + @@ -310,6 +311,14 @@ $('html').bind('keypress', function(e) ?> + + + + + Total + + +

 

@@ -510,11 +519,11 @@ function isCheckKeyCode(event){ } + var totalinst = []; function changeInput(event,k) { - - + var str=event.target.id; var sno = str.substr(8); //alert(sno); @@ -543,8 +552,8 @@ function isCheckKeyCode(event){ var loanamt =parseFloat(document.getElementById('loanamt'+sno).value); var paidamt =parseFloat(document.getElementById('paidamt'+sno).value); - - + + @@ -687,10 +696,8 @@ function isCheckKeyCode(event){ - - - - + + }