From ccf97a5896f07fd10bae40fd83b5ab388506b8c7 Mon Sep 17 00:00:00 2001 From: gayathri1990 Date: Mon, 5 Nov 2018 19:12:00 +0530 Subject: [PATCH] status update --- application/controllers/cashbook.php | 10 +-- application/models/cashbook_model.php | 1 + application/views/bankamountunreceived.php | 2 +- application/views/bankdebit.php | 73 ++++++++++++---------- application/views/bankinvoice.php | 11 ++-- application/views/bankreceivedsupp.php | 4 +- application/views/bankunreceivedsupp.php | 2 +- 7 files changed, 59 insertions(+), 44 deletions(-) diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index 36f08699..e92612bd 100644 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -984,11 +984,12 @@ class cashbook extends BaseController $tdate = $this->input->post('to_date'); //$data['cash'] = $_GET['sid']; //$data['bankid'] = $_GET['d']; - $data['bankdepit'] = $this->cashbook_model->debitbankstatemet($Supplierid,$fdate,$tdate); + $data['bankdepitpaid'] = $this->cashbook_model->debitbankstatemet($Supplierid,$fdate,$tdate); } else { - $data['bankdepit'] = $this->cashbook_model->debitbankstatemet1(); + $data['bankdepitpaid'] = $this->cashbook_model->debitbankstatemet1(); + //print_r($data['bankdepit']); } $data['getsupplier'] = $this->cashbook_model->getsupplier(); $this->loadViews("bankdebit",$this->global,$data,NULL); @@ -1127,11 +1128,11 @@ class cashbook extends BaseController $pono = $this->input->post('pono'); $igrno=$this->input->post('igrno'); $igrlineitem=$this->input->post('igrlineitem'); - + $sname = $this->input->post('sname'); $sid = $this->input->post('sid'); $tot = $this->input->post('tot'); - // echo'tot'.$tot; + $rowcount = $this->input->post('rc'); @@ -1240,6 +1241,7 @@ class cashbook extends BaseController else { $igrstatus=PARTIALLY_PAIDIGR; + } $igrdetails=array('BankStatus'=>$igrstatus); $result1 = $this->cashbook_model->igrdetailstatus($igrdetails,$igrlineitem); diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index 4868deee..35906c79 100644 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -2023,6 +2023,7 @@ function receiptdata() function igrdetailstatus($igrdetails,$igrlineitem) { + echo $igrdetails; $this->db->where('IGRItemNo',$igrlineitem); $this->db->update('T_IGR_Details',$igrdetails); $r = $this->db->affected_rows(); diff --git a/application/views/bankamountunreceived.php b/application/views/bankamountunreceived.php index 07832217..634393a3 100644 --- a/application/views/bankamountunreceived.php +++ b/application/views/bankamountunreceived.php @@ -43,7 +43,7 @@ foreach($financialyear as $item)
-

Un Receivable Invoice Report(

Receivable Invoice Report(Select Supplier - + @@ -169,8 +169,8 @@ foreach($financialyear as $item) $i=1; $ti=0.00; $tvt=0.00; - if(!empty($bankdepit)){ - foreach($bankdepit as $t) + if(!empty($bankdepitpaid)){ + foreach($bankdepitpaid as $t) { $status=$t->Paymentstatus; @@ -185,12 +185,12 @@ foreach($financialyear as $item) CreatedDate),'d-m-Y');?> - PONO?> - IGRNO?> - IGRItemNo?> - SupplierName?> - SupplierID?> - + PONO?> + IGRNO?> + IGRItemNo)?> + SupplierName?> + SupplierID?> + Amountpaid,2)?> @@ -198,7 +198,7 @@ foreach($financialyear as $item) @@ -222,7 +222,7 @@ foreach($financialyear as $item)

@@ -342,15 +342,18 @@ function GetPayment(i) { row = parseInt(row)+1; $('#Rowid').val(row); - var date= document.getElementById ( "date"+i ).innerText;//value taken from table, col name : date - var pono =document.getElementById ( "pono"+i ).innerText;//value taken from table, col name : purchase order no + var date= document.getElementById ("date"+i).innerText;//value taken from table, col name : date - var igrno =document.getElementById ( "igrno"+i ).innerText; - var igrlineitem=document.getElementById ( "igrlineitem"+i ).innerText; - var supname =document.getElementById ("sn"+i ).innerText;//value taken from table col name : suppliername + var pono =document.getElementById ("pono"+i).innerText;//value taken from table, col name : purchase + var igrno1 =document.getElementById ("igrno"+i).innerText; + var igrno=igrno1.trim(); + var igrlineitem1=document.getElementById ("igrlineitem"+i).innerText; + var igrlineitem=igrlineitem1.trim(); + //alert(igrlineitem.trim()); + var supname =document.getElementById ("sn"+i).innerText;//value taken from table col name : suppliername var supid =document.getElementById ("sid"+i ).innerText; var totalordervalue =document.getElementById ("tov"+i ).innerText;//value taken from table col name : total po amount - var invoicepayment =document.getElementById ( "qw"+i ).innerText;//value taken from table col name : Balance to pay + var invoicepayment =document.getElementById ("qw"+i).innerText;//value taken from table col name : Balance to pay $('#invoicepaymet'+i).val(invoicepayment);//to copy the value from 'balance to pay' to 'amount paid' @@ -420,7 +423,7 @@ function GetPayment(i) intex = parseInt(intex)+1; var bankdebitamount=$('#debitamount').val(); - var totalvalue=$('#addvalue').val(); + //var totalvalue=$('#addvalue').val(); //var balanceamount=bankdebitamount-totalvalue; // alert(bankdebitamount); // alert(totalvalue); @@ -436,13 +439,14 @@ function GetPayment(i) else { - + alert('esle'); var rr = $('#Rowid').val(); row = parseInt(rr)-1; var Payment = parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val()); - var Inid = document.getElementById ('igrlineitem'+i ).innerText + var Inid1 = document.getElementById ('igrlineitem'+i ).innerText + var Inid=Inid1.trim(); var ponovalue = i+','+Inid+','+Payment; $.each(temppo,function(i,val){ @@ -464,7 +468,7 @@ else calculategrandtotal(); - $('#invoicepaymet'+i).val(''); + //$('#invoicepaymet'+i).val(''); $('#Rowid').val(row); @@ -523,20 +527,23 @@ function GetAmount(i) if(x==true ) { - var date= document.getElementById ( "date"+i ).innerText; - var pono =document.getElementById ( "pono"+i ).innerText; - var igr =document.getElementById ( "igrno"+i ).innerText; - var igrlineitem=document.getElementById ( "igrlineitem"+i ).innerText; - var supname =document.getElementById ("sn"+i ).innerText; + var date= document.getElementById ("date"+i).innerText; + var pono =document.getElementById ("pono"+i).innerText; + var igr =document.getElementById ("igrno"+i).innerText; + var igrlineitem1=document.getElementById ("igrlineitem"+i).innerText; + var igrlineitem=igrlineitem1.trim(); + alert(igrlineitem+'true'); + var supname =document.getElementById ("sn"+i).innerText; var supid =document.getElementById ("sid"+i ).innerText; var totalordervalue =document.getElementById ("tov"+i ).innerText; - var balancetopay =document.getElementById ( "qw"+i ).innerText; + var balancetopay =document.getElementById ("qw"+i ).innerText; for(k=1;k<=i;k++) { //alert(k); - var idcheck=$('#igrlineitem'+k).val(); - + var idcheck1=$('#igrlineitem'+k).val(); + var idcheck=idcheck1.trim(); + if(igrlineitem == idcheck) { var cid=k; @@ -589,9 +596,10 @@ function GetAmount(i) /** To calculate the overall total and store the value in table's footer */ function calculategrandtotal(){ + $.each(temppo, function( index, value ) { - + alert(temppo); var res2 = value.split(','); tempTotal[index]=parseFloat(res2[2]); //alert(tempTotal[index]); @@ -625,6 +633,7 @@ function Save() // alert('rwval'+'-'+rw); check = parseFloat(check)+1; var bankdebitamount=$('#debitamount').val(); + alert(bankdebitamount+'da'); // alert('bankdebitamountval'+'-'+bankdebitamount); var bid =$('#bankid').val(); @@ -634,10 +643,10 @@ function Save() var pono =$('#hidepono'+number).val(); //alert('ponoval'+'-'+pono); var igrno =$('#hideigrno'+number).val(); + // alert('igrnoval'+'-'+igrno); - var igrlineitem =$('#hideigrline'+number).val(); - // alert('igrlineitemval'+'-'+igrlineitem); + var igrlineitem =$('#hideigrline'+number).val(); var suppliername=$('#hidesupname'+number).val(); diff --git a/application/views/bankinvoice.php b/application/views/bankinvoice.php index b6040f8d..969f596d 100644 --- a/application/views/bankinvoice.php +++ b/application/views/bankinvoice.php @@ -332,8 +332,9 @@ if(x==true) row = parseInt(row)+1; $('#Rowid').val(row); var date= document.getElementById ( "invoicedate"+i ).innerText; - var invid =document.getElementById ( "invoice_id"+i ).innerText; - //alert(invid); + var invid1 =document.getElementById ( "invoice_id"+i ).innerText; + var invid=invid1.trim(); + var cusname =document.getElementById ("client_name"+i ).innerText; var cusid =document.getElementById ("clientid"+i ).innerText; @@ -414,7 +415,8 @@ else row = parseInt(rr)-1; var Payment= parseFloat( $('#invoicereceived'+i).val() == '' ? '0.00' : $('#invoicereceived'+i).val()); - var Inid = document.getElementById ('invoice_id'+i ).innerText + var Inid1 = document.getElementById ('invoice_id'+i ).innerText + var Inid=Inid1.trim(); var invoicevalue = i+','+Inid+','+Payment; //alert(invoicevalue); @@ -480,7 +482,8 @@ function GetAmount(i) { var date= document.getElementById ( "invoicedate"+i ).innerText; - var invid =document.getElementById ( "invoice_id"+i ).innerText; + var invid1 =document.getElementById ( "invoice_id"+i ).innerText; + var invid=invid1.trim(); var cusname =document.getElementById ("client_name"+i ).innerText; var cusid =document.getElementById ("clientid"+i ).innerText; diff --git a/application/views/bankreceivedsupp.php b/application/views/bankreceivedsupp.php index d29cae05..50a273d8 100644 --- a/application/views/bankreceivedsupp.php +++ b/application/views/bankreceivedsupp.php @@ -216,7 +216,7 @@ foreach($financialyear as $item) Supplier Name - Paid Amount (₹) + Received Amount (₹) @@ -299,7 +299,7 @@ foreach($financialyear as $item) Account Name - Paid Amount(₹) + Received Amount(₹) diff --git a/application/views/bankunreceivedsupp.php b/application/views/bankunreceivedsupp.php index d69f9076..36712516 100644 --- a/application/views/bankunreceivedsupp.php +++ b/application/views/bankunreceivedsupp.php @@ -158,7 +158,7 @@ Supplier Name - UnReceivable Amount (₹) + Receivable Amount (₹)