files
This commit is contained in:
parent
4d723e43e9
commit
250c6d3b2d
@ -1,7 +1,7 @@
|
||||
<?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.
|
||||
|
|
||||
|
||||
@ -195,12 +195,13 @@ class emergencypurchaseorder extends BaseController
|
||||
$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'];
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -94,7 +94,7 @@ if(!empty($POMaster))
|
||||
}
|
||||
}
|
||||
|
||||
//echo $BudgetType;
|
||||
//echo $PONO;
|
||||
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
|
||||
@ -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
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -254,6 +254,9 @@ $(document).ready(function() {
|
||||
"language": {
|
||||
"emptyTable": "<center> Data Not Found ! </center>"
|
||||
},
|
||||
"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>>",
|
||||
|
||||
@ -364,6 +364,9 @@ $.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||
"language": {
|
||||
"emptyTable":"<center> Data Not Found ! </center>"
|
||||
},
|
||||
"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>>",
|
||||
|
||||
@ -399,6 +399,9 @@ $(document).ready(function() {
|
||||
"language": {
|
||||
"emptyTable": "<center> Data Not Found ! </center>"
|
||||
},
|
||||
"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>>",
|
||||
|
||||
@ -505,6 +505,7 @@ $(document).ready(function() {
|
||||
"language": {
|
||||
"emptyTable": "<center> Data Not Found ! </center>"
|
||||
},
|
||||
|
||||
"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>>",
|
||||
|
||||
@ -562,7 +562,7 @@ $('.splpofile').click(function() {
|
||||
"language": {
|
||||
"emptyTable": "<center> Data Not Found ! </center>"
|
||||
},
|
||||
"aaSorting": [[ 3, "asc" ]],
|
||||
"aaSorting": [[ 3, "desc" ]],
|
||||
"autoWidth": false,
|
||||
orderCellsTop: true,
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
|
||||
@ -264,6 +264,9 @@ $(document).ready(function() {
|
||||
"language": {
|
||||
"emptyTable": "<center> Data Not Found ! </center>"
|
||||
},
|
||||
"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>>",
|
||||
|
||||
@ -68,7 +68,7 @@ $totIgst = 0.0;
|
||||
$ServiceDescription = '';
|
||||
$CapitalRange = '';
|
||||
$otherPayment='';
|
||||
$BudgetType = '';
|
||||
$BudgetType = '';
|
||||
if(!empty($POMaster))
|
||||
{
|
||||
//print_r($POMaster);
|
||||
|
||||
@ -239,6 +239,10 @@ $(document).ready(function() {
|
||||
"language": {
|
||||
"emptyTable": "<center> Data Not Found ! </center>"
|
||||
},
|
||||
|
||||
"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: {
|
||||
|
||||
@ -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'>>" +
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -394,6 +394,7 @@ function(start, end, label) {
|
||||
"columnDefs" : [{"targets":2, "type":"date-eu"}],
|
||||
|
||||
"ordering": true,
|
||||
"aaSorting": [[ 0, "desc" ]],
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user