igrmultiplefileupload

This commit is contained in:
venbatechnologies 2018-06-25 18:32:19 +05:30
parent 3f69e01cdf
commit a99d6f23d7
16 changed files with 1119 additions and 110 deletions

View File

@ -204,41 +204,210 @@ class inwardgateregister extends BaseController
}
function uploadFile()
{
// function edituploadfile
// {
//echo "INSIDE UPLOAFD";
// //echo "INSIDE UPLOAFD";
//$this->load->library('upload')
$pathinfo = pathinfo($_FILES['myfile']['name']);
$config['upload_path'] = 'uploads/Igrfiles/';
$config['allowed_types'] = 'png|jpg|jpeg|pdf|docx';
$config['file_name'] = $_FILES['myfile']['name'];
// $config['overwrite'] = true;
// //$this->load->library('upload')
// $pathinfo = pathinfo($_FILES['myfile']['name']);
// $config['upload_path'] = 'uploads/Igrfiles/';
// $config['allowed_types'] = 'png|jpg|jpeg|pdf|docx';
// $config['file_name'] = $_FILES['myfile']['name'];
// // $config['overwrite'] = true;
//Load upload library and initialize configuration
$this->load->library('upload',$config);
$this->upload->initialize($config);
// //Load upload library and initialize configuration
// $this->load->library('upload',$config);
// $this->upload->initialize($config);
if($this->upload->do_upload('myfile'))
{
$uploadData = $this->upload->data();
$uploadfilename = $uploadData['file_name'];
return $uploadfilename;
// if($this->upload->do_upload('myfile'))
// {
// $uploadData = $this->upload->data();
// $uploadfilename = $uploadData['file_name'];
// return $uploadfilename;
}
else
{
$error = array('error' => $this->upload->display_errors());
$uploadfilename = '';
print_r($error);
return 0;
}
// }
// else
// {
// $error = array('error' => $this->upload->display_errors());
// $uploadfilename = '';
// print_r($error);
// return 0;
// }
}
// }
/*------------inwardateregister multiple file upload service------jun 11----------------------------*/
function adfile()
{
$picture = '';
if(!empty($_FILES['file']['name']))
{
$config['upload_path'] = 'uploads/Igrfiles/';
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
$config['file_name'] = str_replace(" ","",$_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
{
$picture = '';
}
return $picture ;
}
function addloadfile()
{
$pono= $this->input->post('PONO');
$igr= $this->input->post('igr');
$new_file_name =$_FILES['file']['name'];
$new_file_name = str_replace(" ","",$new_file_name);
$files = $this->inwardgateregister_model->getfies($igr);
$fcount = 0;
foreach ($files as $value)
{
$lastfile = $value->FilePath;
if($lastfile == $new_file_name)
{
$fcount ++;
}
}
if($fcount == 0)
{
if(!empty($new_file_name))
{ $Picture = $this->adfile();
$myfiles =array('PONO'=>$pono,'IGRNO'=>$igr,'FilePath'=>$Picture);
// print_r($myfiles);
$upfiles = $this->inwardgateregister_model->fileupload($myfiles);
//print_r($upfiles);
}
}
if( $upfiles > 0){
echo "file updated successfully!";
}
else
{
echo "File name already Exist";
}
}
function add($pathname)
{
// echo "add files";
// die();
//echo $pathname; die();
$picture = '';
if(!empty($_FILES[$pathname]['name']))
{
$config['upload_path'] = 'uploads/Igrfiles/';
$config['allowed_types'] = '*';
//$config['allowed_types'] = 'jpg|jpeg|png|gif';
$config['file_name'] = str_replace(" ","",$_FILES[$pathname]['name']);
//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'];
}
else
{
$error = array('error' => $this->upload->display_errors());
$picture = '';
}
}
else
{
// echo "else";
$picture = '';
}
return $picture ;
}
function edituploadfile()
{
$bill= $this->input->post('param1');
$oldfile = $this->input->post('param2');
$newfile =$this->input->post('file');
// $new_file_name =$_FILES['file']['name'];
$newfile = str_replace(" ","",$newfile);
if(!empty($_FILES['file']['name']))
{
$Picture = $this->adfile();
}else{
$Picture = $oldfile ;
}
//echo $Picture;die;
$uploadfile = $this->inwardgateregister_model->updatefile($bill,$Picture,$oldfile);
// if($uploadfile > 0){
echo "updated successfully!";
// }
// else{
// echo "updated successfully!";
// }
}
function addNewigr()
{
// echo "add";
@ -268,30 +437,127 @@ class inwardgateregister extends BaseController
$IGRStatus = IGR_CREATED;
$document = null;
$fs = 0;
if(!empty($_FILES['myfile']['name']))
{
//echo "FILE AVAILABLE";
$config['file_name'] = $_FILES['myfile']['name'];
$config['upload_path'] = 'uploads/Igrfiles/';
$config['allowed_types'] = 'png|jpg|jpeg|pdf|docx';
$path = $config['upload_path'];
$filename = $config['file_name'];
$document = $path.$filename;
//echo $document;
$fs = $this->uploadFile();
$document = $path.$fs;
//echo $document;die();
}
// $fs = 0;
// // if(!empty($_FILES['myfile']['name']))
// // {
// // //echo "FILE AVAILABLE";
// // $config['file_name'] = $_FILES['myfile']['name'];
// // $config['upload_path'] = 'uploads/Igrfiles/';
// // $config['allowed_types'] = 'png|jpg|jpeg|pdf|docx';
// // $path = $config['upload_path'];
// // $filename = $config['file_name'];
// // $document = $path.$filename;
// // //echo $document;
// // $fs = $this->uploadFile();
// // $document = $path.$fs;
// // //echo $document;die();
// // }
//echo $RowCount;
// //echo $RowCount;
$igr = array();
$igr = array('PONO'=>$PONO,'VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'MaterialRcvdDate'=>$MaterialRcvdDt,'CourierNo'=>$CourierNo,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt,'file'=>$document);
$igr = array('PONO'=>$PONO,'VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'MaterialRcvdDate'=>$MaterialRcvdDt,'CourierNo'=>$CourierNo,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt);
//print_r($igr);die();
$igrM = $this->inwardgateregister_model->addigrM($igr);
/*---------------------------------------JUN 11 change----------------------------------------------------*/
$IGRNO = '';
if(count($igrM)>0)
{
foreach ($igrM as $key )
{
$IGRNO=$key->IGRNO;
}
}
$constant = $this->input->post('hideconstants');
$arr = [];
$prefile =array();
for($i=1;$i<=$constant;$i++)
{
$pathname = 'browseFiles'.$i;
if(!empty($_FILES[$pathname]['name']))
{
$files = str_replace(" ","",$_FILES[$pathname]['name']);
$fcount = 0;
foreach ($prefile as $value)
{
if($value == $files)
{
$fcount++;
}
}
if($fcount == 0)
{
$Picture = $this->add($pathname);
//echo $Picture;
$arr[] = array($Picture);
}
$prefile[] = $files;
}
}
//print_r($arr);
if(!empty($arr))
{
foreach($arr as $ma){
$index = 0;
foreach($ma as $key=>$value){
$index++;
if($index == 1){
$filename = $value;
}
}
if(!empty($filename))
{
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
$this->inwardgateregister_model->fileupload($myfile);
}
}
}
/*-------------------------------------------------------------------------------------------*/
$OGRStatus=IGR_CREATED;
$check_OGRPO= $this->inwardgateregister_model->update_OGR($PONO,$OGRStatus);
@ -412,6 +678,13 @@ class inwardgateregister extends BaseController
echo json_encode($data);
}
function ViewIGRfile()
{
$IGRNO= $this->input->post('id');
$data = $this->inwardgateregister_model->viewIGRFile($IGRNO);
echo json_encode($data);
}
function UpdateIGR()

View File

@ -522,6 +522,22 @@ class report extends BaseController
echo json_encode($data);
}
function Viewnormaligrfiles()
{
$PO= $this->input->post('id');
$PONO= substr($PO,5);
//echo $PONO; die;
$data = $this->dahsboard_Model->getfiles($PONO);
// print_r( $data);die;
echo json_encode($data);
}
public function ipurchase()
{
@ -537,7 +553,7 @@ class report extends BaseController
$m=$this->input->post('month');
$frm = $this->input->post('from_date');
$t = $this->input->post('to_date');
//print_r($prod);
//print_r($prod);
$data['material']=$this->dahsboard_Model->material_name();
$data['cust']=$this->dahsboard_Model->customer_name();
// $data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */

View File

@ -36,6 +36,19 @@ function getfile($PONO)
}
function getfiles($PONO)
{
//$this->db->distinct();
$this->db->select('*');
$this->db->from('T_Inwardgateregister_fileupload');
$this->db->where('PONO',$PONO);
$query = $this->db->get();
// print_r( $this->db->last_query());
$result = $query->result_array();
return $result;
}
function totloan()
{
@ -1483,7 +1496,8 @@ ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)))
- round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
im.file as ifile,pb.FilePath as file
im.file as ifile,pb.FilePath as file ,infiles.FilePath as Infiles
from T_IGR_Master im
left join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
@ -1492,7 +1506,8 @@ left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO = im.IGRNO
left join T_Inwardgateregister_fileupload infiles on infiles.IGRNO = im.IGRNO
where pm.Status != 'ST030' ";
if ($cname!= ''){
@ -1612,7 +1627,10 @@ $sql.="group by pono,material_name,category,supplier_name,id.IGRItemNo";
if(POType = 'CAPITAL' && CapitalRange = 0,(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
ifnull((id.QuantityAsPerInvoice * pl.Rate),0))) + round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), (id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) - round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), (id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total, im.file as ifile,pb.FilePath as file from T_IGR_Master im join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), (id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) - round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), (id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total, im.file as ifile,pb.FilePath as file,infiles.FilePath as Infiles
from T_IGR_Master im join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo left join T_PurchaseOrder_BillUpload pb on pb.IGRNO = im.IGRNO
left join T_Inwardgateregister_fileupload infiles on infiles.IGRNO = im.IGRNO
where pm.Status != 'ST030' ";
@ -1711,15 +1729,16 @@ if ($cname!= ''){
} **/
$sql="select pm.Status AS status,sd.SupplierID AS sid,im.file AS ifile,pb.FilePath AS file,im.IGRNO AS igrn,pm.POType AS potype,im.PONO AS pono,date_format(im.CreatedDate,'%d-%m-%Y') AS created_date,time_format(im.CreatedDate,'%l:%i %p') AS created_time,mm.MaterialName AS material_name,
$sql="select pm.Status AS status,sd.SupplierID AS sid,im.file AS ifile,pb.FilePath AS file,infiles.FilePath as Infiles,im.IGRNO AS igrn,pm.POType AS potype,im.PONO AS pono,date_format(im.CreatedDate,'%d-%m-%Y') AS created_date,time_format(im.CreatedDate,'%l:%i %p') AS created_time,mm.MaterialName AS material_name,
date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,sd.SupplierName AS supplier_name,sum(id.QuantityAsPerInvoice) AS quantity,
round(((((((if((pm.POType = 'IMPORT'),sum((pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate))),if(((pm.POType = 'CAPITAL') and (pm.CapitalRange = 0)),sum((pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate))),ifnull(sum((id.QuantityAsPerInvoice * pl.Rate)),0))) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterSGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_SGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterCGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_CGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterIGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_IGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterFreightValue) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.AfterFreightValue) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterPackagingValue) / pl.Quantity)),0),0),2)) - round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterDiscount) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.Afterdiscountval) / pl.Quantity))),0),2)),2) AS total
from ((((((((T_IGR_Master im join T_PurchaseOrder_LineItem pl on((pl.PONO = im.PONO))) join T_IGR_Details id on(((id.IGRNO = im.IGRNO) and (id.MaterialCode = pl.MaterialCode)))) join T_PurchaseOrder_Master pm on((pm.PONO = pl.PONO)))
from (((((((((T_IGR_Master im join T_PurchaseOrder_LineItem pl on((pl.PONO = im.PONO))) join T_IGR_Details id on(((id.IGRNO = im.IGRNO) and (id.MaterialCode = pl.MaterialCode)))) join T_PurchaseOrder_Master pm on((pm.PONO = pl.PONO)))
left join T_MaterialMaster mm on((mm.MaterialCode = pl.MaterialCode)))
left join T_SupplierDetailsN sd on((sd.SupplierID = pm.SupplierID)))
left join T_Service_Tax st on((st.LineItemNo = pl.LineItemNo)))
left join T_Revenue_Tax rt on((rt.LineItemNo = pl.LineItemNo)))
left join T_PurchaseOrder_BillUpload pb on((pb.PONO = im.PONO)))
left join T_Inwardgateregister_fileupload infiles on ((infiles.IGRNO = im.IGRNO)))
where (pm.Status <> 'ST030') ";

View File

@ -18,6 +18,51 @@ class inwardgateregister_model extends CI_Model
*/
/*--------------------------JUN 11Change ----------------------------------*/
function updatefile($bill,$Picture,$oldfile)
{
// if($oldfile != ''){
// //unlink("uploads/BillFiles/".$oldfile);//this deletes the file on particular folder too
// }
$this->db->set('FilePath', $Picture); //value that used to update column
$this->db->where('BillNo', $bill); //which row want to upgrade
$this->db->update('T_Inwardgateregister_fileupload');
$afftectedRows = $this->db->affected_rows();
return $afftectedRows;
}
function getfies($igr)
{
$this->db->select('*');
$this->db->from('T_Inwardgateregister_fileupload');
$this->db->where('IGRNO',$igr);
$query = $this->db->get();
return $query->result();
}
function fileupload($myfiles)
{
$this->db->insert('T_Inwardgateregister_fileupload',$myfiles);
$myfile=$this->db->affected_rows();
return $myfile;
}
/*------------------------------------------------------------*/
function addMaterialStockHistory($MaterialstockHistoryadd)
{
@ -41,16 +86,48 @@ class inwardgateregister_model extends CI_Model
}
/*------------------------------------------------------------*/
function igrListing()
// function igrListing()
// {
// $this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igr.file');
// $this->db->from('T_IGR_Master igr');
// $this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO');
// $this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID');
// $this->db->order_by('igr.CreatedDate','desc');
// $query = $this->db->get();
// $result = $query->result();
// return $result;
// }
function igrListing()
{
$this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igr.file');
$this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,fileup.FilePath,igr.file');
$this->db->from('T_IGR_Master igr');
$this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO');
$this->db->join('T_Inwardgateregister_fileupload fileup',' igr.IGRNO = fileup.IGRNO','left');
$this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID');
$this->db->order_by('igr.CreatedDate','desc');
$this->db->group_by('igr.IGRNO','desc');
$query = $this->db->get();
$result = $query->result();
return $result;
}
function viewIGRFile($IGRNO)
{
$this->db->distinct();
$this->db->select('*'); //BillNo,IGRNO,FilePath,PONO
$this->db->from('T_Inwardgateregister_fileupload');
$this->db->where('IGRNO',$IGRNO);
$query = $this->db->get();
$result = $query->result();
// print_r($result);die;
//print_r($this->db->last_query());
return $result;
}
function getpurchaseorder()

View File

@ -215,7 +215,7 @@
<div class="box-body">
<div>
<table class="table table-bordered table-hover" id="cc" >
<thead>
<thead>
<tr>
<th style="text-align:center">PO No</th>
<th style="text-align:center">IGR Created Date</th>
@ -247,6 +247,8 @@
$tot_tot= $tot_tot + round($rel->total,2);
echo $rel->total;
?></span></td>
<td style="text-align:center"><span>
<?php
@ -254,8 +256,10 @@
<a target="_blank" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm splpofile" id="files<?php echo $rel->pono;?>">Download</button></a>
<?php }else if(!empty($rel->ifile)) { ?>
<a target="_blank" href="<?php echo base_url().''. $rel->ifile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm">Download</button></a>
<?php
}else {
<?php }else if(!empty($rel->Infiles)){ ?>
<a target="_blank" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm IGRfile" id="files<?php echo $rel->pono;?>">Download</button></a>
<?php } else {
echo 'N/A';
}
?>
@ -307,9 +311,54 @@
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$('.IGRfile').click(function() {
var id = $(this).attr('id');
$("#Fileshow").modal("show");
$.ajax({
data:{id:id},
type:"POST",
//dataType: 'json',
url:"<?php echo base_url() ?>report/Viewnormaligrfiles",
success: function(data){
//console.log((data));
var trHTML = '';
$.each($.parseJSON(data), function (i, item) {
i=i+1;
trHTML += '<tr>' +
'<td align="right">' + i + '</td>' +
'<td>' + item.BillNo+ '</td>' +
'<td>' + item.PONO+ '</td>' +
'<td><a target="_blank" href = <?php echo base_url()?>uploads/BillFiles/'+item.FilePath+'>'+ item.FilePath +'</a></td>' +
// '<td>' +item.FilePath+"<?php echo base_url().'uploads/BillFiles/'?>"> +'</td>'
'</tr>';
});
$("#tbleAppend1").empty();
$('#Inwardgateregistertable1 > tbody').append(trHTML);
}
});
});
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
@ -461,7 +510,5 @@ $.fn.dataTable.moment( 'DD-MM-YYYY' );
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
</script>

View File

@ -360,11 +360,14 @@ table.dataTable thead > tr > td.sorting {
<?php
if(!empty($rel->file)){ ?><!-- if for Inward po file -->
<a target="_blank" class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm splpofile" id="files<?php echo $rel->pono;?>">Download</button></a>
<?php }else if(!empty($rel->ifile)) { ?><!-- else if for igr file -->
<?php }
else if(!empty($rel->ifile )) { ?><!-- else if for igr file -->
<a target="_blank" href="<?php echo base_url().''.$rel->ifile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View">
<button class="btn btn-info btn-sm">Download</button>
</a>
<?php } else { echo 'N/A'; } ?><!-- both inwardpo file and Igr file empty means -->
<?php } else if (!empty($rel->Infiles)){ ?><!-- if for Inward po file -->
<a target="_blank" class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm IGRfile" id="files<?php echo $rel->pono;?>">Download</button></a>
<?php } else { echo 'N/A'; } ?><!-- both inwardpo file and Igr file empty means -->
@ -556,6 +559,37 @@ $('.splpofile').click(function() {
});
});//onclick function closed
$('.IGRfile').click(function() {
var id = $(this).attr('id');
$("#Fileshow").modal("show");
$.ajax({
data:{id:id},
type:"POST",
url:"<?php echo base_url() ?>report/Viewnormaligrfiles",
success: function(data){
var trHTML = '';
$.each($.parseJSON(data), function (i, item) {
i=i+1;
trHTML += '<tr>' +
'<td align="right">' + i + '</td>' +
'<td>' + item.BillNo+ '</td>' +
'<td>' + item.PONO+ '</td>' +
'<td><a target="_blank" href = <?php echo base_url()?>uploads/BillFiles/'+item.FilePath+'>'+ item.FilePath +'</a></td>' +
'</tr>';
});
$("#tbleAppend1").empty();
$('#Inwardgateregistertable1 > tbody').append(trHTML);
}
});
});// onclick function innormal igrfiles
/******************** Datatable codes starts here **************************/
$.fn.dataTable.moment( 'DD-MM-YYYY' );

View File

@ -155,7 +155,12 @@ foreach($financialyear as $item)
<input type="hidden" name="ccbalance" id="ccbalance" value="<?php echo $ap->cclearbalance?>"/>
<input type="hidden" name="btc" id="btc" value="<?php echo $ap->cbalancetocleared?>"/>
<td align="left" id="Mid"><span><?php echo $ap->ID?></span></td>
<td align="left" id="date"><span><?php echo $ap->indate?></span></td>
<!-- <td align="left" id="date"><span><?php echo $ap->indate?></span></td> -->
<td align="right" id="date"><?php
$date = new DateTime($ap->indate);
echo $date->format('d-m-Y'); ?></td>
<td align="left" id="invno"><a href="<?= base_url() ?>cashbook/mappingcredit?sid=<?php echo $ap->invoiceno;?>"><span><?php echo $ap->invoiceno?></span></a></td>
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->

View File

@ -21,7 +21,7 @@
<table id="example1" class="table table-bordered table-hover editableTable" style="font-size:12px;">
<thead>
<tr style="background-color:#ddf">
<th>#</th>
<!-- <th>#</th> -->
<th>Date</th>
<th>Customer Name</th>
<th>Contact Person</th>
@ -57,7 +57,7 @@
?>
<tr id="<?php echo $index ; ?>">
<td align="left"><?php echo $index ; ?></td>
<!-- <td align="left"><?php echo $index ; ?></td> -->
<!-- <td><?php echo $record->Created_Date;?></td> -->
<td align="right"><?php $Pdt = new DateTime($record->Created_Date);
$Created_Date = $Pdt->format('d-m-Y');
@ -105,7 +105,7 @@
"searching": true,
"ordering": true,
// "columnDefs" : [{"targets":1, "type":"date-eu"}],
"aaSorting": [[ 1, "desc" ]],
"aaSorting": [[ 0, "desc" ]],
"info": true,
"autoWidth": false
});

View File

@ -66,15 +66,13 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
<section class="content" style="margin: 15px;"><br/>
<div style="border:2px solid #333;">
<form action ="<?php echo base_url()?>inwardgateregister/addNewigr"
method="post" enctype="multipart/form-data">
<div class="row"><br/><br/>
<div id="content" > </div>
<div class="col-md-12">
<div class="col-md-3">
<?php
$attributes = array('class' => 'form-label-left IGR ','name' => 'IGR','id' => 'IGR');
echo form_open($this->config->base_url().'/inwardgateregister/addNewigr/',$attributes); ?>
<label>Select Purchase Order No </label>
<?php
@ -155,7 +153,9 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
?>
</div>
</div>
<div class="col-md-12">
<!-- <div class="col-md-12">
<div class="col-md-offset-4">
<div class="box-header">
<input type="file" accept=".png,.jpg,.pdf" id="myfile" name="myfile" />
@ -164,10 +164,24 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
<label for="photo">Select File to upload<br/></label>
</div>
</div>
</div> -->
</div>
</div>
<div class="row">
<div class="col-md-12" style="margin-top: 10px;">
<input type="button" class="btn btn-primary" id ="addemorebutton" value=" + ADD FILES..">
<div id="newsdiv"></div><!-- this div for add more section-->
<input type="hidden" name="hidecounters" id="hidecounters" value="0" />
<input type="hidden" name="hideconstants" id="hideconstants" value="0" />
</div>
<div class="row">
<div class="col-md-12">
<table id="Inwardgateregistertable" class="table table-bordered table-hover editabletable IGR_Line" style="background-color:#fff;font-size:12px;">
@ -214,11 +228,14 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
</tr>
</thead>-->
<div class="col-md-1 col-md-offset-10">
<a class="btn btn-primary" id='IGRLink' name='IGRLink' onclick="filecheck();">Generate IGR</a>
</div>
<button class="btn btn-primary" id='IGRLink' type="submit" name='IGRLink' onclick="filecheck();">Generate IGR</button>
</div>
</div>
</div>
@ -258,7 +275,7 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
</div>
</section>
@ -600,9 +617,11 @@ function isNumberKey(evt)
function Save()
{
//alert("save function worked ");
// var file = $('#images'+counterConstants).val()
if (validate())
{
var file = $('#images'+counterConstants).val()
// alert($('#Inwardgateregistertable').rows.count);
//alert(" if condition validation part ");
// $('#content').loader('show');
@ -614,7 +633,7 @@ function Save()
// success:function(data) {
// if(data){
// $('#content').loader('hide');
// document.getElementById('finaligr').innerHTML=data;
@ -625,7 +644,7 @@ function Save()
// alert("Error");
// }
//var file = $('#images'+counterConstants).val();
// }//success function closed
// });//ajax closed
//var tablevalue = $('#specialtable').tableToJSON(); // Convert the table into a javascript object
@ -640,32 +659,129 @@ function Save()
</script>
<script>
var counters = 0;
var counterConstants = 0;
$("#addemorebutton").click(function(){
//alert('sda');
if(counters>4){
alert("No more files to add");//this allows only 5 files;
return false;
}
else{
counters++;
counterConstants++;
var div = document.createElement('div');
div.id = "divid"+counterConstants;
div.className="row";
div.innerHTML='<div class="col-md-12">'+
// '<div class="col-md-3">'+
// '<label>File Name</label>'+
// '<input type="text" id="maint_filename'+counterConstant+'" name="filename'+counterConstant+'" class="form-control" onkeypress="return false;" readonly/>'+
// '</div>'+
'<div class="col-md-3">'+
'<label><br></label>'+
'<input type="file" id="images" name="browseFiles'+counterConstants+'" onchange="Copyfilenames(this.name);"><br>'+
'</div>'+
'<div class="col-md-2">'+
'<label><br><br></label>'+
'<button class="btn btn-danger remove remove_this" id="removebtn'+counterConstants+'" onclick="removeRows(this.id)"><i class="fa fa-trash"></i> Remove</button></div>'+
'</div>'+
'</div>';
$('#newsdiv').append(div);
$('#hidecounters').val(counters);
$('#hideconstants').val(counterConstants);
// document.write("browseFiles"+length);
}
});
function filecheck()
{
var myfile = $('#myfile').val();
if(myfile=='')
//alert(counterConstants);
var file1 = $('#images'+counterConstants).val();
//alert(myfile);
if(file1=='')
{
alert('File not Found');
Save();
alert('File not Found');
//Save();
}
else
{
var sizef = document.getElementById('myfile').files[0].size;
var myfile = $('#myfile').val();
if(myfile!='' && sizef < 2100000)
{
alert('Your file added successfully');
Save();
}
else
{
alert('Sorry Your File is Large To 2MB');
$('#myfile').val('');
}
Save();
}
// var sizef = document.getElementById('myfile').files[0].size;
// var myfile = $('#myfile').val();
// if(myfile!='' && sizef < 2100000)
// {
// alert('Your file added successfully');
// Save();
// }
// else
// {
// alert('Sorry Your File is Large To 2MB');
// $('#myfile').val('');
// }
}
// }
}
function Copyfilenames(id)
{
var size = $('input[name='+id+']')[0].files[0].size;
var number = id.replace(/[^0-9]+/ig,"");
if(size > 2100000){
//alert(id);
alert('Sorry Your File is Large To 2MB');
removeRows(id);
//$('input[name = browseFiles'+number+']').val(' ');
}else {
var name = $('input[name='+id+']')[0].files[0].name;
//alert(name);
//$("#maint_filename"+number).val(name);
}
}
function removeRows(input) {
var number = input.replace(/[^0-9]+/ig,"");
if(counters>= 1){
counters --;
$("#divid"+number).remove();
$('#hidecounter').val(counters);
}
}
</script>

View File

@ -1,7 +1,7 @@
<style>
.modal
.modal
{
padding-right:25% ! important;
}
@ -27,7 +27,7 @@
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddf">
<tr>
<!-- <th>S.No</th> -->
<!-- <th>S.No</th> -->
<th>IGR No</th>
<th>PO No</th>
<th>Supplier Name</th>
@ -44,14 +44,19 @@
<?php
if(!empty($IGR))
{ $index = 0;
// print_r($IGR);
// die;
foreach($IGR as $record)
{
$index = $index +1;
?>
<tr id="<?php echo $index ?>" >
<!-- <td style="text-align: center;"><?php echo $index?></td> -->
<!-- <td style="text-align: center;"><?php echo $index?></td> -->
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<%=index%>" data-userid="<?php echo $record->IGRNO ?>" > <u><?php echo $record->IGRNO ?></u></a></td>
<td><?php echo $record->PONO ?></a></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
@ -62,15 +67,25 @@
<td><?php echo $record->CourierNo ?></td>
<td>
<?php
if(!empty($record->file))
if(!empty($record->FilePath))
{
?>
<a target="_blank" href="<?php echo base_url().$record->file ?>"><i class="fa fa-download" ></i></a>
<!-- <a target="_blank" href="<?php echo base_url().$record->file ?>"><i class="fa fa-download" ></i></a> -->
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-userid="<?php echo $record->IGRNO ?>"><button class="btn btn-info btn-sm " >Download</button></a>
<?php
}
else
else if(!empty($record->file))
{ ?>
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-userid="<?php echo $record->IGRNO ?>"><button class="btn btn-info btn-sm ">Download</button></a>
<?php }
else
{
echo "NO FILE";
}
@ -95,6 +110,118 @@
</div>
</div>
</div>
<!-- ######################################edit file########################### -->
<div class="modal fade" id="Fileshow" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<form>
<div class="modal-content" style="width:800px;">
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center><h4>Inward Gate File Details</h4></center> <!-- IGR number should display here-->
</div>
<!-- Table to show the line item of po -->
<div id="contents" > </div>
<table class="table table-bordered" id="Inwardgateregisterfile" style="font-size:12px;">
<thead style="background-color:#ddf">
<tr>
<th>SNo</th>
<th>BillNO</th>
<th>IGRNO</th>
<th>FileName</th>
<th>Action</th>
</tr>
</thead>
<tbody id="tblefile">
</tbody>
</table>
<!-- <div class="col-md-12">
<div class="col-md-offset-10 col-md-8" >
<input type="button" class="btn btn-primary" id ="addmorebutton" value=" ADD FILES..">
</div>
<div id="newdiv"></div>
<input type="hidden" name="hidecounter" id="hidecounter" value="0" />
<!-- <input type="hidden" name="hideconstant" id="hideconstant" value="0" />
<input type ="hidden" name ="hiddenIGRNO" id="hiddenIGRNO"/>
<input type ="hidden" name ="hiddenPONO" id="hiddenPONO" />
</div> -->
<div class="modal-footer">
<!-- <a class="btn btn-primary" data-dismiss="modal" id='editfileadd' value="">ADD</a> -->
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
</div>
</div>
</form>
</div>
</div>
<div id="billModel" class="modal fade" data-backdrop-limit="1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-dialog">
<div class="modal-content" style="width:950px;">
<div class="modal-header">
<h4 class="modal-title">Update Bill Details</h4>
</div>
<form class="tagForm" id="tag-form" method="post" enctype="multipart/form-data" >
<div class="modal-body" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-5">
<!-- onChange="filecheck();" -->
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG,.jpg" id="billimag" name="images" />
<label for="images">Select file <br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
</div>
</div>
<input type="hidden" name="hideoldfile" id="hideoldfile" class="form-control" readonly>
<input type="hidden" name="hidebillno" id="hidebillno" class="form-control"
readonly>
</div><!-- /.modal body -->
<div class="modal-footer">
<div class="col-md-12 text-right">
<div class="col-md-4 col-md-offset-8">
<a class="btn btn-primary" onclick="fileupdate()" >&nbsp;&nbsp;<span class="bold">Update</span>
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
</div>
</div>
</div><!-- /.modal footer -->
</form>
</div><!-- /.modal content -->
</div><!-- /.modal dialog -->
</div><!-- /#filemodal -->
<!-- ################################################################# -->
<div class="modal fade" id="Igrshow" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
@ -230,9 +357,162 @@
</div>
</form>
</div>
</div>
</div>
</section>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
function filecheck()
{
var sizef = document.getElementById('billimag').files[0].size;
var file = $('#billimag').val();
if(file!='' && sizef < 2100000)
{ // alert('Your file added successfully');
}
else
{
alert('Sorry Your File is Large To 2MB');
$('#billimag').val('');
}
}
function fileupdate(){
var formData = new FormData();
//var file = document.getElementById('billimag').files[0];
var file = $("#billimag").prop('files')[0];
var param1 = $('#hidebillno').val();
// alert(param1);
var param2 = $('#hideoldfile').val();
// alert(param2);
// var filename = $("#billimag").val();
// filename = filename.split('\\');
formData.append('file',file);
formData.append('param1',param1);
formData.append('param2',param2);
$('.content').loader('show');
$.ajax({
data:formData,
type:"POST",
url:"<?php echo base_url() ?>inwardgateregister/edituploadfile",
cache : false,
contentType : false,
processData : false,
success:function(data) {
if(data){
alert(data);
window.location.reload();
$('.content').loader('hide');
// $('#spl').find('td').eq(5).text(filename[2]);
$('#billModel').modal('hide');
}
}
});
}
//$(function () {
$(document).ready(function() {
$("#Fileshow").on("shown.bs.modal",function(e) {
//var id = $(this).attr('id');
var id = $(e.relatedTarget).data('userid');
// alert(id);
$("#hiddenIGRNO").val(id);
if(id !=''){
$.ajax({
data:{id:id},
type:"POST",
//dataType: 'json',
url:"<?php echo base_url() ?>inwardgateregister/ViewIGRfile",
success: function(data)
{
console.log(data);
var trHTML = '';
$.each(JSON.parse(data), function (i, item)
{
i=i+1;
trHTML += '<tr id='+i+'>' +
'<td align="right">' + i + '</td>' +
'<td id="billno'+i+'">' + item.BillNo+ '</td>' +
'<td>' + item.IGRNO+ '</td>' +
'<td id="file'+i+'"><a target="_blank" href = <?php echo base_url()?>uploads/Igrfiles/'+item.FilePath+'>'+ item.FilePath +'</a></td>' +
'<td name="filepathname" id="filepathname" onclick="openbillmodel('+i+');"><i class="fa fa-pencil"></i></td>' +
'</tr>';
});
$("#tblefile").empty();
$("#tblefile").append(trHTML);
}
});
}
});
});
function openbillmodel(i){
// alert(i);
// return false;
var igr = $("#tblefile").find('tr').find('td').eq(2).text();
// alert(igr);
var Billno = $("#billno"+i).text();
// alert(Billno);
var file = $("#file"+i).text();
//alert(file);
$("#billModel").modal("show");
$("#bill").text(Billno);
$("#hideoldfile").val(file);
$("#hidebillno").val(Billno);
}
</script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
@ -245,16 +525,20 @@
"lengthChange": true,
"searching": true,
"ordering": true,
"aaSorting": [[ 4, "desc" ]],
"aaSorting": [[ 5, "desc" ]],
"info": true,
"autoWidth": true
});
});
</script>
<script>
$("#Igrshow").on("shown.bs.modal", function(e) {
var igr = $(e.relatedTarget).data('userid');
// alert(igr);
$('#content').loader('show');
@ -312,5 +596,143 @@ $("#Igrshow").on("shown.bs.modal", function(e) {
});
});
</script>
<script>
var counter = 0;
//var counterConstant = 0;
$("#addmorebutton").click(function(){
counter++;
var div = document.createElement('div');
div.id = "divid";
div.className="row";
//alert(counter);
div.innerHTML='<div class="col-md-12">'+
// '<div class="col-md-3">'+
// '<label>File Name</label>'+
// '<input type="text" id="maint_filename'+counterConstant+'" name="filename'+counterConstant+'" class="form-control" onkeypress="return false;" readonly/>'+
// '</div>'+
'<div class="col-md-3">'+
'<label><br></label>'+
'<input type="file" name="browseFiles" id="images'+counter+'" onchange="Copyfilename(this.name); "><br>'+
'</div>'+
// '<div class="col-md-3">'
// '<label><br><br></label>'+
// '<button class="btn btn-danger remove remove_this" id="removebtn'+counterConstant+'" onclick="removeRow(this.id)"><i class="fa fa-trash"></i> Remove</button></div>'+
'<div class="col-md-2">'+
'<label><br><br></label>'+
'<button class="btn btn-primary add add_this" id="addbtn" onclick="addRow()">ADD</button></div>'+
'</div>'+
'</div>';
$('#newdiv').append(div);
$('#hidecounter').val(counter);
if(counter>1){
alert("Add button click here");//this allows only 5 files;
return false;
}
else{
$('#addmorebutton').hide();
}
//}
});
function addRow()
{
//var file = $('#imag').val();
var file = $('#images'+counter).val();
if (file == '')
{
alert('File not found');
}
else {
fileupload(counter);
}
}
// function Copyfilename(id)
// {
// var size = $('input[name='+id+']')[0].files[0].size;
// var number = id.replace(/[^0-9]+/ig,"");
// if(size > 2100000){
// //alert(id);
// alert('Sorry Your File is Large To 2MB');
// removeRow(id);
// //$('input[name = browseFiles'+number+']').val(' ');
// }else {
// var name = $('input[name='+id+']')[0].files[0].name;
// //alert(name);
// $("#maint_filename"+number).val(name);
// }
// }
function fileupload(counter)
{
// alert(counter);
var formData = new FormData();
// var file = $("#images"+counter).prop('file')[0];
var file = document.getElementById('images'+counter).files[0];
// alert(file);
var PONO =$('#hiddenPONO').val();
// alert(PONO);
var igr =$('#hiddenIGRNO').val();
// alert(igr);
formData.append('file',file);
formData.append('PONO',PONO);
formData.append('count',counter);
formData.append('igr',igr);
$('.content').loader('show');
$.ajax({
data:formData,
type:"POST",
url:"<?php echo base_url() ?>inwardgateregister/addloadfile",
cache : false,
contentType : false,
processData : false,
success:function(data) {
if(data){
alert(data);
//window.location.reload();
$('.content').loader('hide');
// $('#spl').find('td').eq(5).text(filename[2]);
$('#billModel').modal('hide');
}
}
});
}
</script>

View File

@ -43,7 +43,7 @@
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddf">
<tr>
<th>S.No</th>
<!-- <th>S.No</th> -->
<th>IGR No</th>
<th>PO No</th>
<th>Supplier Name</th>
@ -66,7 +66,7 @@
$index = $index +1;
?>
<tr id="<?php echo $index ?>" >
<td style="text-align: center;"><?php echo $index?></td>
<!-- <td style="text-align: center;"><?php echo $index?></td> -->
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<%=index%>" data-userid="<?php echo $record->IGRNO ?>" > <u><?php echo $record->IGRNO ?></u></a></td>
<td><?php echo $record->PONO ?></a></td>
<td><?php echo $record->SupplierName ?></td>
@ -235,7 +235,7 @@
"searching": true,
"ordering": true,
//"columnDefs" : [{"targets":5, "type":"date-eu"}],
"aaSorting": [[ 5, "desc" ]],
"aaSorting": [[ 4, "desc" ]],
"info": true,
"autoWidth": true

View File

@ -24,7 +24,7 @@
<table id="MRIRtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddf">
<tr>
<th>S.No</th>
<!-- <th>S.No</th> -->
<th>MRIR No</th>
<th>IGR No</th>
<th>PO No</th>
@ -52,7 +52,7 @@
<tr id="<?php echo $Index ?>">
<td style="text-align: center;"><?php echo $Index ?></td>
<!-- <td style="text-align: center;"><?php echo $Index ?></td> -->
<td><?php echo $d->MRIRNO ?></td>
<td><?php echo $d->IGRNO ?></td>
<td><?php echo $d->PONO ?></td>
@ -99,7 +99,7 @@ $.fn.dataTable.moment( 'DD-MM-YYYY' );
"lengthChange": true,
"searching": true,
"ordering": true,
"aaSorting": [[ 7, "desc" ]],
"aaSorting": [[ 6, "desc" ]],
"info": true,
"autoWidth": true

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
uploads/Igrfiles/1.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB