From 2f9b1f114929c7e837953faff4845edd95f3f8b8 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 4 Jun 2018 19:14:21 +0530 Subject: [PATCH] podate to inward in cashbook --- application/controllers/purchaseorder.php | 18 +++++++++++---- application/models/cashbook_model.php | 6 ++--- application/views/bankdebit.php | 2 +- .../views/editRevenuepurchaseorder.php | 23 ++++++++++--------- 4 files changed, 29 insertions(+), 20 deletions(-) mode change 100755 => 100644 application/controllers/purchaseorder.php diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php old mode 100755 new mode 100644 index 3ed40997..157b8b31 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -4275,8 +4275,8 @@ function addloadfile() { $pono= $this->input->post('PONO'); - $new_file_name =$_FILES['param1']['name']; - //echo $new_file_name; + $new_file_name =$_FILES['file']['name']; + //echo $new_file_name;die; if(!empty($new_file_name)) { $Picture = $this->adfile(); @@ -4303,18 +4303,26 @@ $filelist =array('PONO'=>$pono,'FilePath'=>$Picture); function adfile() { $picture = ''; - if(!empty($_FILES['param1']['name'])) + if(!empty($_FILES['file']['name'])) { $config['upload_path'] = 'uploads/BillFiles/'; $config['allowed_types'] = 'docx|pdf|doc|png|jpg'; - $config['file_name'] = $_FILES['param1']['name']; - // print_r($config) ; + $config['file_name'] = $_FILES['file']['name']; + // print_r($config);die; //Load upload library and initialize configuration $this->load->library('upload',$config); $this->upload->initialize($config); + if($this->upload->do_upload('file')) + { $uploadData = $this->upload->data(); $picture = $uploadData['file_name']; + } + else + { + $error = array('error' => $this->upload->display_errors()); + $picture = ''; + } } else diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index 08d7650b..76d1d0cc 100755 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -295,12 +295,12 @@ $query = $this->db->query($sql); //die(); //$Supplierid; $this->db->distinct(); - $this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName, + $this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName,igr.CreatedDate, POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid, - POM.PODate,POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status, + POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status, PUADV.AdvanceAmount'); $this->db->from ('T_PurchaseOrder_Master POM'); - + $this->db->join('T_IGR_Master igr','igr.PONO = POM.PONO'); $this->db->join('T_SupplierDetailsN supp','supp.SupplierID = POM.SupplierID'); $this->db->join('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left'); diff --git a/application/views/bankdebit.php b/application/views/bankdebit.php index 350da7ed..bcb0002f 100644 --- a/application/views/bankdebit.php +++ b/application/views/bankdebit.php @@ -150,7 +150,7 @@ foreach($financialyear as $item) - PODate),'d-m-Y');?> + CreatedDate),'d-m-Y');?> PONO?> SupplierName?> TotalOrderValue?> diff --git a/application/views/editRevenuepurchaseorder.php b/application/views/editRevenuepurchaseorder.php index d9c2619b..7c7a2e22 100644 --- a/application/views/editRevenuepurchaseorder.php +++ b/application/views/editRevenuepurchaseorder.php @@ -5905,20 +5905,20 @@ function splpoupdate(){ } -function fileupload() +function fileupload(counter) { var formData = new FormData(); - var file = $("#images").prop('files')[0]; - //console.log(file); - var param1 =$('#images').prop('files')[0]; + var file = $("#images"+counter).prop('files')[0]; + // console.log(file); + var PONO =$('#txtPONO').val(); - formData.append('param1',param1); + formData.append('file',file); formData.append('PONO',PONO); - + formData.append('count',counter); $('.content').loader('show'); $.ajax({ @@ -5976,13 +5976,14 @@ $("#addmorebutton").click(function(){ // } // else{ - // counter++; - // counterConstant++; + counter++; + var div = document.createElement('div'); div.id = "divid"; div.className="row"; +//alert(counter); div.innerHTML='
'+ // '
'+ // ''+ @@ -5990,7 +5991,7 @@ div.innerHTML='
'+ // '
'+ '
'+ ''+ - '
'+ + '
'+ '
'+ // '
' // ''+ @@ -6020,10 +6021,10 @@ var file = $('#images').val(); if (file=='') { alert('File not found'); - fileupload(); + } else{ - fileupload(); + fileupload(counter); } }