diff --git a/application/config/routes.php b/application/config/routes.php index 7effb624..c5015542 100755 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -1,7 +1,7 @@ load->library('upload',$config); $this->upload->initialize($config); if($this->upload->do_upload($pathname)) { + // echo "uploadif"; $uploadData = $this->upload->data(); $picture = $uploadData['file_name']; } @@ -212,6 +213,7 @@ class emergencypurchaseorder extends BaseController } else { + // echo "else"; $picture = ''; } @@ -222,7 +224,7 @@ class emergencypurchaseorder extends BaseController /*----------------------------------special po file upload service----------------------------------*/ function add($pathname) { - // echo "add files"; + echo "add files"; // die(); //echo $pathname; die(); @@ -234,12 +236,13 @@ function add($pathname) $config['allowed_types'] = '*'; //$config['allowed_types'] = 'jpg|jpeg|png|gif'; $config['file_name'] = $_FILES[$pathname]['name']; - + echo "if"; //Load upload library and initialize configuration $this->load->library('upload',$config); $this->upload->initialize($config); if($this->upload->do_upload($pathname)) { + echo "uploadif"; $uploadData = $this->upload->data(); $picture = $uploadData['file_name']; } @@ -251,6 +254,7 @@ function add($pathname) } else { + echo "else"; $picture = ''; } @@ -459,9 +463,7 @@ function add($pathname) } } - else { - - } + @@ -473,19 +475,48 @@ function add($pathname) $constant = $this->input->post('hideconstants'); -$arr = []; - for($i=1;$i<=$constant;$i++){ + + $arr = []; +$prefile =array(); + + for($i=1;$i<=$constant;$i++) + { $pathname = 'browseFiles'.$i; + if(!empty($_FILES[$pathname]['name'])) { - - - $Picture = $this->add($pathname); - //echo $Picture; - $arr[] = array($Picture); + $fcount = 0; + + foreach ($prefile as $value) + { + + + if($value == $_FILES[$pathname]['name']) + { + + + $fcount++; + } + + + + + } + + if($fcount == 0) + { + $Picture = $this->add($pathname); + //echo $Picture; + $arr[] = array($Picture); + + } + + $prefile[] = $_FILES[$pathname]['name']; + } - } + } + //print_r($arr); if(!empty($arr)) { @@ -501,13 +532,13 @@ $arr = []; } -$myfile = array('FilePath'=>$filename,'PONO'=>$PONO); + $myfile = array('FilePath'=>$filename,'PONO'=>$PONO); $this->purchaseorder_model->fileupload($myfile); - } - } + } + } } @@ -984,52 +1015,93 @@ $RequestedBy = $this->input->post('drpDepartment'); $constants = $this->input->post('hideconstant'); -$arr = []; +// $arr = []; - for($i=1;$i<=$constants;$i++){ +// for($i=1;$i<=$constants;$i++){ +// $pathname = 'browseFiles'.$i; + + + +// if(!empty($_FILES[$pathname]['name'])) +// { +// $Picture = $this->addfile($pathname); +// //echo $Picture; +// $arr[$i] = array($Picture); +// } + + +// } + + $arr = []; +$prefile =array(); + + for($i=1;$i<=$constants;$i++) + { $pathname = 'browseFiles'.$i; - - if(!empty($_FILES[$pathname]['name'])) { - $Picture = $this->addfile($pathname); - //echo $Picture; - $arr[$i] = array($Picture); + $fcount = 0; + + foreach ($prefile as $value) + { + + + if($value == $_FILES[$pathname]['name']) + { + + + $fcount++; + } + + + + + } + + if($fcount == 0) + { + $Picture = $this->addfile($pathname); + //echo $Picture; + $arr[] = array($Picture); + + } + + $prefile[] = $_FILES[$pathname]['name']; + } - - - } -//print_r($arr); + } if(!empty($arr)) { - foreach($arr as $ma){ + foreach($arr as $ma) + { $index = 0; $filename = null; - foreach($ma as $key=>$value){ + foreach($ma as $key=>$value) + { $index++; if($index == 1){ $filename = $value; } } - + if(!empty($filename)) + { $myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO); - - - - - $this->purchaseorder_model->fileupload($myfile); + $this->purchaseorder_model->fileupload($myfile); + } - - -} + } - } + + } + + + } diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index fa3d3290..b4d5a639 100644 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -504,6 +504,8 @@ function edited(){ /* End Here */ $data['POMaster'] = $this->purchaseorder_model->GetServicePurchaseOrder($PONO); + //print_r($data['POMaster']); + //die(); //$data['POSTATUS']=$this->purchaseorder_model->GetServicePurchaseOrder($PONO); //print_r($data['POMaster']); foreach ($data['POMaster'] as $Exc) diff --git a/application/controllers/report.php b/application/controllers/report.php index b2376b89..e8117720 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -7,7 +7,7 @@ require APPPATH . '/libraries/BaseController.php'; * User Class to control all user related operations. * @author : Saravana kumar * @version : 1.1 - * @since : 10 Jun 2017 + * @since : 10 Jun 2017 */ class report extends BaseController { diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 537ee0ab..25f0cc23 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -919,7 +919,7 @@ function GetPOType($ReqNo) $this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID'); $this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status'); $this->db->join('T_PurchaseOrder_LineItem LineItem', 'POMast.PONO = LineItem.PONO'); - $this->db->join('T_IGR_Master IGR','POMast.PONO = IGR.PONO'); + $this->db->join('T_IGR_Master IGR','POMast.PONO = IGR.PONO','left'); $this->db->where('POMast.PONO', $PONO); $query = $this->db->get(); diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php index 909438a8..f574d683 100755 --- a/application/views/EditservicePurchaseorder.php +++ b/application/views/EditservicePurchaseorder.php @@ -94,7 +94,7 @@ if(!empty($POMaster)) } } -//echo $BudgetType; +//echo $PONO; if(!empty($RequistionDetails)) { diff --git a/application/views/FinalProductlisting.php b/application/views/FinalProductlisting.php index 5850cc59..77430a1e 100644 --- a/application/views/FinalProductlisting.php +++ b/application/views/FinalProductlisting.php @@ -82,7 +82,11 @@ "scrollCollapse" : true, "searching" : true, "columnDefs" : [{"targets":3, "type":"date-eu"}], - "bInfo": true + "bInfo": true, + + // "aaSorting": [[ 0, "desc" ]], + // "info": true, + // "autoWidth": true }); }); diff --git a/application/views/Report_POreleased.php b/application/views/Report_POreleased.php index 422da54a..9c7d4a04 100755 --- a/application/views/Report_POreleased.php +++ b/application/views/Report_POreleased.php @@ -254,6 +254,9 @@ $(document).ready(function() { "language": { "emptyTable": "
Data Not Found !
" }, + "aaSorting": [[ 3, "desc" ]], + "autoWidth": false, + orderCellsTop: true, "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", diff --git a/application/views/Report_attach_inward.php b/application/views/Report_attach_inward.php index 23f82a48..3f25bb33 100755 --- a/application/views/Report_attach_inward.php +++ b/application/views/Report_attach_inward.php @@ -364,6 +364,9 @@ $.fn.dataTable.moment( 'DD-MM-YYYY' ); "language": { "emptyTable":"
Data Not Found !
" }, + "aaSorting": [[ 3, "desc" ]], + "autoWidth": false, + orderCellsTop: true, "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", diff --git a/application/views/Report_pending_purchase.php b/application/views/Report_pending_purchase.php index 5bf0c271..a4ba0958 100755 --- a/application/views/Report_pending_purchase.php +++ b/application/views/Report_pending_purchase.php @@ -399,6 +399,9 @@ $(document).ready(function() { "language": { "emptyTable": "
Data Not Found !
" }, + "aaSorting": [[ 3, "desc" ]], + "autoWidth": false, + orderCellsTop: true, "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", diff --git a/application/views/Report_purchase.php b/application/views/Report_purchase.php index 57f5a203..fd930ec2 100755 --- a/application/views/Report_purchase.php +++ b/application/views/Report_purchase.php @@ -505,6 +505,7 @@ $(document).ready(function() { "language": { "emptyTable": "
Data Not Found !
" }, + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", diff --git a/application/views/Report_purchase_inward.php b/application/views/Report_purchase_inward.php index 2595c39a..0395ced5 100755 --- a/application/views/Report_purchase_inward.php +++ b/application/views/Report_purchase_inward.php @@ -562,7 +562,7 @@ $('.splpofile').click(function() { "language": { "emptyTable": "
Data Not Found !
" }, - "aaSorting": [[ 3, "asc" ]], + "aaSorting": [[ 3, "desc" ]], "autoWidth": false, orderCellsTop: true, "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + diff --git a/application/views/deliver_perform.php b/application/views/deliver_perform.php index 09702fe1..3c8d0d53 100644 --- a/application/views/deliver_perform.php +++ b/application/views/deliver_perform.php @@ -264,6 +264,9 @@ $(document).ready(function() { "language": { "emptyTable": "
Data Not Found !
" }, + "aaSorting": [[ 3, "desc" ]], + "autoWidth": false, + orderCellsTop: true, "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", diff --git a/application/views/editRevenuepurchaseorder.php b/application/views/editRevenuepurchaseorder.php index 6317e3f2..86e1cc56 100644 --- a/application/views/editRevenuepurchaseorder.php +++ b/application/views/editRevenuepurchaseorder.php @@ -68,7 +68,7 @@ $totIgst = 0.0; $ServiceDescription = ''; $CapitalRange = ''; $otherPayment=''; -$BudgetType = ''; +$BudgetType = ''; if(!empty($POMaster)) { //print_r($POMaster); diff --git a/application/views/report_pendingreqst.php b/application/views/report_pendingreqst.php index 5be21a85..3f2b127b 100755 --- a/application/views/report_pendingreqst.php +++ b/application/views/report_pendingreqst.php @@ -239,6 +239,10 @@ $(document).ready(function() { "language": { "emptyTable": "
Data Not Found !
" }, + + "aaSorting": [[ 3, "desc" ]], + "autoWidth": false, + orderCellsTop: true, "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", @@ -247,6 +251,7 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', + //messageTop: $('h3').text(), title: $('h3').text(), exportOptions: { diff --git a/application/views/salarycostforproduction.php b/application/views/salarycostforproduction.php index 221758f1..491e4fcb 100644 --- a/application/views/salarycostforproduction.php +++ b/application/views/salarycostforproduction.php @@ -314,6 +314,10 @@ th{ $(document).ready(function() { $.fn.dataTable.moment( 'DD-MM-YYYY' ); table = $('#testreport').DataTable( { + + "aaSorting": [[ 3, "desc" ]], + "autoWidth": false, + orderCellsTop: true, "dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + diff --git a/application/views/storerequisition.php b/application/views/storerequisition.php index e3fe5734..a0895787 100755 --- a/application/views/storerequisition.php +++ b/application/views/storerequisition.php @@ -153,9 +153,15 @@ $ReqDate = $dt->format('d-m-Y'); echo $ReqDate ?> "ordering": true, "columnDefs" : [{"targets":5, "type":"date-eu"}], + // "info": true, + // "autoWidth": true + + + "aaSorting": [[ 0, "desc" ]], "info": true, "autoWidth": true + }); }); diff --git a/application/views/storerequisitionlisting.php b/application/views/storerequisitionlisting.php index 1111c01c..33b07cd6 100755 --- a/application/views/storerequisitionlisting.php +++ b/application/views/storerequisitionlisting.php @@ -394,6 +394,7 @@ function(start, end, label) { "columnDefs" : [{"targets":2, "type":"date-eu"}], "ordering": true, + "aaSorting": [[ 0, "desc" ]], "info": true, "autoWidth": true diff --git a/index.php b/index.php index b80f449d..8a7c0119 100755 --- a/index.php +++ b/index.php @@ -202,4 +202,4 @@ if (defined('ENVIRONMENT')) require_once BASEPATH.'core/CodeIgniter.php'; /* End of file index.php */ -/* Location: ./index.php */ \ No newline at end of file +/* Location: ./index.php */