From 5725f23c931f4c2c737e46d6c50bd16da6c98718 Mon Sep 17 00:00:00 2001 From: gayathri1990 Date: Tue, 17 Apr 2018 20:33:46 +0530 Subject: [PATCH] bankstatement --- application/config/routes.php | 1 + application/controllers/cashbook.php | 20 +-- application/models/cashbook_model.php | 24 ++- application/views/bankamountreceived.php | 6 +- application/views/bankdebit.php | 213 ++++++++++------------- application/views/bankingfile.php | 17 +- application/views/bankinvoice.php | 45 +++-- application/views/editincomeexpenses.php | 37 +++- application/views/includes/header.php | 28 ++- 9 files changed, 193 insertions(+), 198 deletions(-) diff --git a/application/config/routes.php b/application/config/routes.php index 990e1e37..b809f2ec 100755 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -223,6 +223,7 @@ $route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad"; $route['addIncomeExpense'] = "cashbook/addIncomeExpense"; $route['updateExpense'] = "cashbook/updateExpense"; $route['Bankingview']= "cashbook/bankfileview"; +$route['Bankfiletostatement']= "cashbook/bankfileupload"; $route['Bankingstatement']= "cashbook/bankdata"; $route['Debitstatement']= "cashbook/bankdebitdata"; $route['Cashstatement']= "cashbook/cashreceipt"; diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index a2db93e8..0e78abc8 100755 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -190,11 +190,11 @@ class cashbook extends BaseController $res = $this->cashbook_model->bankfiledata($filedataupload); } if( $res == 1 ){ - echo ""; + echo ""; } else { - echo ""; + echo ""; } } } @@ -879,7 +879,8 @@ class cashbook extends BaseController $podata1 = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid); - + print_r($podata1); + //die(); $podata = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid); @@ -923,6 +924,8 @@ class cashbook extends BaseController $rw = $this->input->post('rw'); $date = $this->input->post('date'); + $date = date_create($date);//,'Y-m-d'); + $date = date_format($date,'Y-m-d'); $invid = $this->input->post('invid'); $cname = $this->input->post('cname'); $invamount = $this->input->post('invamount'); @@ -1036,6 +1039,7 @@ class cashbook extends BaseController $this->global['pageTitle'] = 'Siddharth : amountpaid'; $data['amountpaid'] = $this->cashbook_model->paided(); + $data['supplier'] = $this->cashbook_model->getsupplier(); $this->loadViews("bankamountpaid", $this->global,$data, NULL); } @@ -1046,14 +1050,8 @@ class cashbook extends BaseController // $this->load->model('cashbook_model'); $this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; - - $data['amountreceived'] = $this->cashbook_model->received(); - - //print_r( $data['amountpaid']); - //die(); - - - + $data['getcustomer'] = $this->cashbook_model->getcustomer(); + $data['amountreceived'] = $this->cashbook_model->received(); $this->loadViews("bankamountreceived", $this->global,$data, NULL); } diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index 85f4f745..2dc43b43 100755 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -232,8 +232,7 @@ function debitpolist($bankid) Balancetopay,Amountpaid'); $this->db->from ('T_Bankmappingpo'); $this->db->where('mid',$bankid); - - //$this->db->group_by('PONO'); + //$this->db->group_by('PONO'); $query = $this->db->get(); return $query->result(); @@ -241,7 +240,7 @@ function debitpolist($bankid) function creditinvoicelist($bankid) { - $this->db->select('indate,invoiceno,customername,totinvoiceamount,bankid, + $this->db->select('indate,invoiceno,customername,totinvoiceamount,bankid, balancetoreceived,amountreceived'); $this->db->from ('T_Bankmappingiv'); $this->db->where('bankid',$bankid); @@ -254,7 +253,7 @@ function debitpolist($bankid) function invoiceamonut($bankid) { $this->db->select('sum(amountreceived)as amountreceived'); - $this->db->from ('T_Bankinvoicereport'); + $this->db->from ('T_Bankmappingiv'); $this->db->where('bankid',$bankid); //$this->db->group_by('invoiceno'); $query = $this->db->get(); @@ -265,7 +264,7 @@ function debitpolist($bankid) function poamonut($bankid) { $this->db->select('sum(Amountpaid)as amountpaid'); - $this->db->from ('T_Bankporeport'); + $this->db->from ('T_Bankmappingpo'); $this->db->where('mid',$bankid); //$this->db->group_by('invoiceno'); $query = $this->db->get(); @@ -323,10 +322,9 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono) { $this->db->select('bmp.mid,bmp.PONO,bmp.Amountpaid,br.Narration'); $this->db->from ('T_Bankmappingpo as bmp'); - - $this->db->join('T_bankreport br','br.ID = bmp.mid'); + $this->db->join('T_bankreport br','br.ID = bmp.mid'); $this->db->where('PONO',$pono); - // $this->db->group_by('PONO'); + //$this->db->group_by('PONO'); $query = $this->db->get(); return $query->result(); @@ -336,9 +334,9 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono) { $this->db->select('bmp.bankid,bmp.invoiceno,bmp.amountreceived,br.Narration'); $this->db->from ('T_Bankmappingiv as bmp'); - $this->db->join('T_bankreport br','br.ID = bmp.bankid'); - $this->db->where('invoiceno',$invno); - // $this->db->group_by('PONO'); + $this->db->join('T_bankreport br','br.ID = bmp.bankid'); + $this->db->where('invoiceno',$invno); + //$this->db->group_by('invoiceno'); $query = $this->db->get(); return $query->result(); @@ -524,7 +522,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono) function paided() { $this->db->select('*'); - $this->db->from('T_Bankporeport'); + $this->db->from('T_Bankmappingpo'); $query = $this->db->get(); $result = $query->result(); return $result; @@ -533,7 +531,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono) function received() { $this->db->select('*'); - $this->db->from('T_Bankinvoicereport'); + $this->db->from('T_Bankmappingiv'); $query = $this->db->get(); $result = $query->result(); return $result; diff --git a/application/views/bankamountreceived.php b/application/views/bankamountreceived.php index 69c49e31..e276c23e 100644 --- a/application/views/bankamountreceived.php +++ b/application/views/bankamountreceived.php @@ -106,13 +106,13 @@ if(!empty($amountpaid)) ').attr({ type:'hidden', - name:'pono1'+j, - id:'pono1'+j, + name:'purchaseono'+j, + id:'purchaseono'+j, value:pono - }).appendTo('#pono1'); + }).appendTo('#purchaseono'); $('').attr({ type:'hidden', - name:'sn1'+j, - id:'sn1'+j, + name:'supname'+j, + id:'supname'+j, value:supname - }).appendTo('#sn1'); + }).appendTo('#supname'); $('').attr({ type:'hidden', - name:'qw1'+j, - id:'qw1'+j, + name:'totala'+j, + id:'totala'+j, value:invoicepayment - }).appendTo('#qw1'); + }).appendTo('#totala'); $('').attr({ type:'hidden', - name:'tov1'+j, - id:'tov1'+j, + name:'ttamnt'+j, + id:'ttamnt'+j, value:totalordervalue - }).appendTo('#tov1'); - -//j= parseInt(j)+1; - - + }).appendTo('#ttamnt'); + intex = parseInt(intex)+1; + j=parseInt(j)+1; + var to=0; + for(t=1;t=parseFloat(totalvalue)) { +//alert(date+'date'); +//die(); //alert('you have remainining'+balnceamount); $.ajax( { diff --git a/application/views/bankingfile.php b/application/views/bankingfile.php index b1d773bf..ca481d55 100644 --- a/application/views/bankingfile.php +++ b/application/views/bankingfile.php @@ -47,26 +47,17 @@ function checkYearMonthAsEmpty()
-
+
Bank Names
diff --git a/application/views/bankinvoice.php b/application/views/bankinvoice.php index 6fb1ea72..5cba6bbd 100644 --- a/application/views/bankinvoice.php +++ b/application/views/bankinvoice.php @@ -268,7 +268,7 @@
-
+
@@ -390,7 +390,7 @@ if(x==true) }).appendTo('#customername1'); $('').attr({ - type:'text', + type:'hidden', name:'invoiceamount1'+j, id:'invoiceamount1'+j, value:invoiceamount @@ -398,10 +398,10 @@ if(x==true) $('').attr({ type:'hidden', - name:'invoice_balance1'+j, - id:'invoice_balance1'+j, + name:'invoicerec'+j, + id:'invoicerec'+j, value:invoicereceived - }).appendTo('#invoice_balance1'); + }).appendTo('#invoicerec'); @@ -429,10 +429,8 @@ if(x==true) for(t=1;t diff --git a/application/views/editincomeexpenses.php b/application/views/editincomeexpenses.php index ec92544c..4a2ce958 100755 --- a/application/views/editincomeexpenses.php +++ b/application/views/editincomeexpenses.php @@ -233,7 +233,7 @@ function loadAccountType(id)

Payment ID:  

Total Amount:  Rs

Payment Mode:  Bank

-

Remaining Balance:  Rs

+

Remaining Balance:  Rs

@@ -522,15 +522,41 @@ function loadAccountType(id)