This commit is contained in:
venbatechnologies 2018-06-15 13:43:58 +05:30
parent 4d723e43e9
commit 250c6d3b2d
19 changed files with 155 additions and 48 deletions

View File

@ -1,7 +1,7 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* /*
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------
| URI ROUTING | URI ROUTING
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions. | This file lets you re-map URI requests to specific controller functions.
| |

View File

@ -195,12 +195,13 @@ class emergencypurchaseorder extends BaseController
$config['allowed_types'] = '*'; $config['allowed_types'] = '*';
//$config['allowed_types'] = 'jpg|jpeg|png|gif'; //$config['allowed_types'] = 'jpg|jpeg|png|gif';
$config['file_name'] = $_FILES[$pathname]['name']; $config['file_name'] = $_FILES[$pathname]['name'];
// echo "if";
//Load upload library and initialize configuration //Load upload library and initialize configuration
$this->load->library('upload',$config); $this->load->library('upload',$config);
$this->upload->initialize($config); $this->upload->initialize($config);
if($this->upload->do_upload($pathname)) if($this->upload->do_upload($pathname))
{ {
// echo "uploadif";
$uploadData = $this->upload->data(); $uploadData = $this->upload->data();
$picture = $uploadData['file_name']; $picture = $uploadData['file_name'];
} }
@ -212,6 +213,7 @@ class emergencypurchaseorder extends BaseController
} }
else else
{ {
// echo "else";
$picture = ''; $picture = '';
} }
@ -222,7 +224,7 @@ class emergencypurchaseorder extends BaseController
/*----------------------------------special po file upload service----------------------------------*/ /*----------------------------------special po file upload service----------------------------------*/
function add($pathname) function add($pathname)
{ {
// echo "add files"; echo "add files";
// die(); // die();
//echo $pathname; die(); //echo $pathname; die();
@ -234,12 +236,13 @@ function add($pathname)
$config['allowed_types'] = '*'; $config['allowed_types'] = '*';
//$config['allowed_types'] = 'jpg|jpeg|png|gif'; //$config['allowed_types'] = 'jpg|jpeg|png|gif';
$config['file_name'] = $_FILES[$pathname]['name']; $config['file_name'] = $_FILES[$pathname]['name'];
echo "if";
//Load upload library and initialize configuration //Load upload library and initialize configuration
$this->load->library('upload',$config); $this->load->library('upload',$config);
$this->upload->initialize($config); $this->upload->initialize($config);
if($this->upload->do_upload($pathname)) if($this->upload->do_upload($pathname))
{ {
echo "uploadif";
$uploadData = $this->upload->data(); $uploadData = $this->upload->data();
$picture = $uploadData['file_name']; $picture = $uploadData['file_name'];
} }
@ -251,6 +254,7 @@ function add($pathname)
} }
else else
{ {
echo "else";
$picture = ''; $picture = '';
} }
@ -459,9 +463,7 @@ function add($pathname)
} }
} }
else {
}
@ -473,19 +475,48 @@ function add($pathname)
$constant = $this->input->post('hideconstants'); $constant = $this->input->post('hideconstants');
$arr = [];
for($i=1;$i<=$constant;$i++){
$arr = [];
$prefile =array();
for($i=1;$i<=$constant;$i++)
{
$pathname = 'browseFiles'.$i; $pathname = 'browseFiles'.$i;
if(!empty($_FILES[$pathname]['name'])) if(!empty($_FILES[$pathname]['name']))
{ {
$fcount = 0;
$Picture = $this->add($pathname); foreach ($prefile as $value)
//echo $Picture; {
$arr[] = array($Picture);
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); //print_r($arr);
if(!empty($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); $this->purchaseorder_model->fileupload($myfile);
} }
} }
} }
@ -984,52 +1015,93 @@ $RequestedBy = $this->input->post('drpDepartment');
$constants = $this->input->post('hideconstant'); $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; $pathname = 'browseFiles'.$i;
if(!empty($_FILES[$pathname]['name'])) if(!empty($_FILES[$pathname]['name']))
{ {
$Picture = $this->addfile($pathname); $fcount = 0;
//echo $Picture;
$arr[$i] = array($Picture); 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)) if(!empty($arr))
{ {
foreach($arr as $ma){ foreach($arr as $ma)
{
$index = 0; $index = 0;
$filename = null; $filename = null;
foreach($ma as $key=>$value){ foreach($ma as $key=>$value)
{
$index++; $index++;
if($index == 1){ if($index == 1){
$filename = $value; $filename = $value;
} }
} }
if(!empty($filename))
{
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO); $myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
$this->purchaseorder_model->fileupload($myfile);
}
$this->purchaseorder_model->fileupload($myfile);
}
}
}
}
} }

View File

@ -504,6 +504,8 @@ function edited(){
/* End Here */ /* End Here */
$data['POMaster'] = $this->purchaseorder_model->GetServicePurchaseOrder($PONO); $data['POMaster'] = $this->purchaseorder_model->GetServicePurchaseOrder($PONO);
//print_r($data['POMaster']);
//die();
//$data['POSTATUS']=$this->purchaseorder_model->GetServicePurchaseOrder($PONO); //$data['POSTATUS']=$this->purchaseorder_model->GetServicePurchaseOrder($PONO);
//print_r($data['POMaster']); //print_r($data['POMaster']);
foreach ($data['POMaster'] as $Exc) foreach ($data['POMaster'] as $Exc)

View File

@ -7,7 +7,7 @@ require APPPATH . '/libraries/BaseController.php';
* User Class to control all user related operations. * User Class to control all user related operations.
* @author : Saravana kumar * @author : Saravana kumar
* @version : 1.1 * @version : 1.1
* @since : 10 Jun 2017 * @since : 10 Jun 2017
*/ */
class report extends BaseController class report extends BaseController
{ {

View File

@ -919,7 +919,7 @@ function GetPOType($ReqNo)
$this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID'); $this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID');
$this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status'); $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_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); $this->db->where('POMast.PONO', $PONO);
$query = $this->db->get(); $query = $this->db->get();

View File

@ -94,7 +94,7 @@ if(!empty($POMaster))
} }
} }
//echo $BudgetType; //echo $PONO;
if(!empty($RequistionDetails)) if(!empty($RequistionDetails))
{ {

View File

@ -82,7 +82,11 @@
"scrollCollapse" : true, "scrollCollapse" : true,
"searching" : true, "searching" : true,
"columnDefs" : [{"targets":3, "type":"date-eu"}], "columnDefs" : [{"targets":3, "type":"date-eu"}],
"bInfo": true "bInfo": true,
// "aaSorting": [[ 0, "desc" ]],
// "info": true,
// "autoWidth": true
}); });
}); });
</script> </script>

View File

@ -254,6 +254,9 @@ $(document).ready(function() {
"language": { "language": {
"emptyTable": "<center> Data Not Found ! </center>" "emptyTable": "<center> Data Not Found ! </center>"
}, },
"aaSorting": [[ 3, "desc" ]],
"autoWidth": false,
orderCellsTop: true,
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",

View File

@ -364,6 +364,9 @@ $.fn.dataTable.moment( 'DD-MM-YYYY' );
"language": { "language": {
"emptyTable":"<center> Data Not Found ! </center>" "emptyTable":"<center> Data Not Found ! </center>"
}, },
"aaSorting": [[ 3, "desc" ]],
"autoWidth": false,
orderCellsTop: true,
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",

View File

@ -399,6 +399,9 @@ $(document).ready(function() {
"language": { "language": {
"emptyTable": "<center> Data Not Found ! </center>" "emptyTable": "<center> Data Not Found ! </center>"
}, },
"aaSorting": [[ 3, "desc" ]],
"autoWidth": false,
orderCellsTop: true,
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",

View File

@ -505,6 +505,7 @@ $(document).ready(function() {
"language": { "language": {
"emptyTable": "<center> Data Not Found ! </center>" "emptyTable": "<center> Data Not Found ! </center>"
}, },
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",

View File

@ -562,7 +562,7 @@ $('.splpofile').click(function() {
"language": { "language": {
"emptyTable": "<center> Data Not Found ! </center>" "emptyTable": "<center> Data Not Found ! </center>"
}, },
"aaSorting": [[ 3, "asc" ]], "aaSorting": [[ 3, "desc" ]],
"autoWidth": false, "autoWidth": false,
orderCellsTop: true, orderCellsTop: true,
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +

View File

@ -264,6 +264,9 @@ $(document).ready(function() {
"language": { "language": {
"emptyTable": "<center> Data Not Found ! </center>" "emptyTable": "<center> Data Not Found ! </center>"
}, },
"aaSorting": [[ 3, "desc" ]],
"autoWidth": false,
orderCellsTop: true,
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",

View File

@ -68,7 +68,7 @@ $totIgst = 0.0;
$ServiceDescription = ''; $ServiceDescription = '';
$CapitalRange = ''; $CapitalRange = '';
$otherPayment=''; $otherPayment='';
$BudgetType = ''; $BudgetType = '';
if(!empty($POMaster)) if(!empty($POMaster))
{ {
//print_r($POMaster); //print_r($POMaster);

View File

@ -239,6 +239,10 @@ $(document).ready(function() {
"language": { "language": {
"emptyTable": "<center> Data Not Found ! </center>" "emptyTable": "<center> Data Not Found ! </center>"
}, },
"aaSorting": [[ 3, "desc" ]],
"autoWidth": false,
orderCellsTop: true,
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
@ -247,6 +251,7 @@ $(document).ready(function() {
{ {
extend: 'excelHtml5', extend: 'excelHtml5',
footer: 'true', footer: 'true',
//messageTop: $('h3').text(), //messageTop: $('h3').text(),
title: $('h3').text(), title: $('h3').text(),
exportOptions: { exportOptions: {

View File

@ -314,6 +314,10 @@ th{
$(document).ready(function() { $(document).ready(function() {
$.fn.dataTable.moment( 'DD-MM-YYYY' ); $.fn.dataTable.moment( 'DD-MM-YYYY' );
table = $('#testreport').DataTable( { table = $('#testreport').DataTable( {
"aaSorting": [[ 3, "desc" ]],
"autoWidth": false,
orderCellsTop: true,
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" + "dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-6'><'col-md-6'>>" +

View File

@ -153,9 +153,15 @@ $ReqDate = $dt->format('d-m-Y'); echo $ReqDate ?>
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":5, "type":"date-eu"}], "columnDefs" : [{"targets":5, "type":"date-eu"}],
// "info": true,
// "autoWidth": true
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true
}); });
}); });
</script> </script>

View File

@ -394,6 +394,7 @@ function(start, end, label) {
"columnDefs" : [{"targets":2, "type":"date-eu"}], "columnDefs" : [{"targets":2, "type":"date-eu"}],
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -202,4 +202,4 @@ if (defined('ENVIRONMENT'))
require_once BASEPATH.'core/CodeIgniter.php'; require_once BASEPATH.'core/CodeIgniter.php';
/* End of file index.php */ /* End of file index.php */
/* Location: ./index.php */ /* Location: ./index.php */