search date for desc

This commit is contained in:
venbatechnologies 2018-06-18 11:49:48 +05:30
parent 7828743022
commit f5f6f5ff06
29 changed files with 55 additions and 49 deletions

View File

@ -4167,11 +4167,12 @@ function addloadfile()
$new_file_name =$_FILES['file']['name']; $new_file_name =$_FILES['file']['name'];
$file = $this->purchaseorder_model->getfies($pono); $files = $this->purchaseorder_model->getfies($pono);
$fcount=0;
foreach ($file as $value) $fcount = 0;
foreach ($files as $value)
{ {
$lastfile = $value->FilePath; $lastfile = $value->FilePath;
@ -4179,8 +4180,8 @@ $fcount=0;
if($lastfile == $new_file_name) if($lastfile == $new_file_name)
{ {
$fcount++; $fcount ++;
echo 'File name already Exist';
} }
} }
@ -4191,12 +4192,16 @@ $fcount=0;
{ {
$Picture = $this->adfile(); $Picture = $this->adfile();
$filelist =array('PONO'=>$pono,'IGRNO'=>$igr,'FilePath'=>$Picture); $filelist =array('PONO'=>$pono,'IGRNO'=>$igr,'FilePath'=>$Picture);
$uploadfile = $this->purchaseorder_model->insertfile($filelist); $uploadfiles = $this->purchaseorder_model->insertfile($filelist);
} }
if($uploadfile > 0){ if($uploadfiles > 0){
echo "file updated successfully!"; echo "file updated successfully!";
} }
else
{
echo "File name already Exist";
}
} }

View File

@ -6,7 +6,7 @@ require APPPATH . '/libraries/BaseController.php';
/** /**
* Class : purchaseorder (PurchaseorderController) * Class : purchaseorder (PurchaseorderController)
* User Class to control all user related operations. * User Class to control all user related operations.
* @author : VenbaMail Mali * @author : VenbaMail Mali
* @version : 1.1 * @version : 1.1
* @since : 15 Feb 2016 * @since : 15 Feb 2016
@ -665,21 +665,12 @@ function uploadfile()
$new_file_name =$_FILES['file']['name']; $new_file_name =$_FILES['file']['name'];
//echo $new_file_name;die;
// if(!empty($new_file_name)) $files = $this->purchaseorder_model->getfies($pono);
// {
// $Picture = $this->adfile();
// }
// else
// {
// $Picture ='';
// }
//echo $Picture;die;
$file = $this->purchaseorder_model->getfies($pono);
$fcount=0; $fcount = 0;
foreach ($file as $value) foreach ($files as $value)
{ {
$lastfile = $value->FilePath; $lastfile = $value->FilePath;
@ -698,15 +689,10 @@ $upfile='';
if($fcount == 0) if($fcount == 0)
{ {
$Picture = $this->adfile(); $Picture = $this->adfile();
$filelist =array('PONO'=>$pono,'FilePath'=>$Picture); $filelist =array('PONO'=>$pono,'FilePath'=>$Picture);
$upfile = $this->purchaseorder_model->insertfile($filelist); $upfile = $this->purchaseorder_model->insertfile($filelist);
} }
if($upfile > 0){ if($upfile > 0){
echo "file updated successfully!"; echo "file updated successfully!";
} }

View File

@ -111,6 +111,7 @@
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":3, "type":"date-eu"}], "columnDefs" : [{"targets":3, "type":"date-eu"}],
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": false "autoWidth": false

View File

@ -79,7 +79,7 @@
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":9, "type":"date-eu"}], "columnDefs" : [{"targets":9, "type":"date-eu"}],
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -257,6 +257,7 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -113,6 +113,7 @@
"paging" : true, "paging" : true,
"ordering" : true, "ordering" : true,
"scrollCollapse" : true, "scrollCollapse" : true,
"aaSorting": [[ 0, "desc" ]],
"searching" : true, "searching" : true,
// "columnDefs" : [{"targets":3, "type":"date-eu"}], // "columnDefs" : [{"targets":3, "type":"date-eu"}],
"bInfo": true "bInfo": true

View File

@ -113,6 +113,7 @@ if(!empty($mms))
$(document).ready(function() { $(document).ready(function() {
$.fn.dataTable.moment( 'DD-MM-YYYY' ); $.fn.dataTable.moment( 'DD-MM-YYYY' );
table = $('#cc').DataTable( { table = $('#cc').DataTable( {
"aaSorting": [[ 0, "desc" ]],
"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>>",
@ -121,6 +122,7 @@ $(document).ready(function() {
{ {
extend: 'excelHtml5', extend: 'excelHtml5',
footer: 'true', footer: 'true',
//messageTop: $('h3').text(), //messageTop: $('h3').text(),
title: 'Report - Material Master - SupplierWise', title: 'Report - Material Master - SupplierWise',
exportOptions: { exportOptions: {

View File

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

View File

@ -82,7 +82,7 @@
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":7, "type":"date-eu"}], "columnDefs" : [{"targets":7, "type":"date-eu"}],
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -333,7 +333,7 @@ else
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": false, "ordering": false,
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true, "autoWidth": true,

View File

@ -38,7 +38,11 @@
<td><?php echo $record->Config_ID?></td> <td><?php echo $record->Config_ID?></td>
<td><?php echo $record->ConfigName ?></td> <td><?php echo $record->ConfigName ?></td>
<td><?php echo $record->Comments ?> </td> <td><?php echo $record->Comments ?> </td>
<td><?php echo $record->CreatedDate?></td> <td><?php echo $record->CreatedDate?></td>
<!-- <td align="right"><?php
$date = new DateTime($record->CreatedDate);
echo $date->format('d-m-Y'); ?></td> -->
<td><a href="<?php echo base_url().'configurationctrl/editOldconfig?ConfigID='.$record->Config_ID; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a> <td><a href="<?php echo base_url().'configurationctrl/editOldconfig?ConfigID='.$record->Config_ID; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>
<a><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a></td> <a><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a></td>
@ -65,7 +69,8 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"info": true, "aaSorting": [[ 0, "desc" ]],
"info": true,
"autoWidth": true "autoWidth": true
}); });

View File

@ -40,7 +40,7 @@
<td><?php echo $record->CostCenterName ?></td> <td><?php echo $record->CostCenterName ?></td>
<!-- <td><?php echo $record->ApprovedBy ?></td> --> <!-- <td><?php echo $record->ApprovedBy ?></td> -->
<td><?php echo $record->FirstName ?></td> <td><?php echo $record->FirstName ?></td>
<td align="right"><?php <td align="right"><?php
$date = new DateTime($record->CreatedDate); $date = new DateTime($record->CreatedDate);
echo $date->format('d-m-Y'); ?></td> echo $date->format('d-m-Y'); ?></td>
@ -80,7 +80,7 @@
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":3, "type":"date-eu"}], "columnDefs" : [{"targets":3, "type":"date-eu"}],
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -866,9 +866,10 @@ $(function(){
"scrollY": 500, "scrollY": 500,
"scrollX": true, "scrollX": true,
"ordering": false, "ordering": false,
"aaSorting": [[ 0, "desc" ]],
"info": false, "info": false,
"paging": true, "paging": true,
"searching": false "searching": true
} ); } );

View File

@ -99,7 +99,7 @@
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":1, "type":"date-eu"}], "columnDefs" : [{"targets":1, "type":"date-eu"}],
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": false "autoWidth": false
}); });

View File

@ -278,7 +278,7 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": false, "ordering": false,
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true, "autoWidth": true,

View File

@ -491,6 +491,7 @@ function Redirect()
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -397,7 +397,7 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true
@ -413,7 +413,7 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": false, "ordering": false,
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -55,7 +55,7 @@ speed:500
<tr> <tr>
<th>Month Year</th> <th>Month Year</th>
<th>Employee Id</th> <th>Employee Id</th>
<th>Employee Name</th> <th>Employee Name</th>
<th>LOP Days</th> <th>LOP Days</th>
<th>OT Hours Worked in Hrs</th> <th>OT Hours Worked in Hrs</th>
<th>Loan Recovered in </th> <th>Loan Recovered in </th>

View File

@ -485,7 +485,7 @@ th{
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -709,7 +709,7 @@ th{
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -93,6 +93,7 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": false "autoWidth": false
}); });

View File

@ -138,7 +138,7 @@
"columnDefs" : [{"targets":2, "type":"date-eu"}], "columnDefs" : [{"targets":2, "type":"date-eu"}],
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true, "autoWidth": true,

View File

@ -108,7 +108,7 @@
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":2, "type":"date-eu"}], "columnDefs" : [{"targets":2, "type":"date-eu"}],
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true, "autoWidth": true,

View File

@ -95,7 +95,7 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true, "autoWidth": true,

View File

@ -102,7 +102,7 @@
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":3, "type":"date-eu"}], "columnDefs" : [{"targets":3, "type":"date-eu"}],
"aaSorting": [[ 0, "asc" ]], "aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true, "autoWidth": true,

View File

@ -164,7 +164,7 @@ $Adv='';
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":13, "type":"date-eu"}], "columnDefs" : [{"targets":13, "type":"date-eu"}],
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": false "autoWidth": false
}); });

View File

@ -241,6 +241,7 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -233,7 +233,7 @@
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"columnDefs" : [{"targets":5, "type":"date-eu"}], "columnDefs" : [{"targets":5, "type":"date-eu"}],
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true

View File

@ -95,6 +95,7 @@
"lengthChange": true, "lengthChange": true,
"searching": true, "searching": true,
"ordering": true, "ordering": true,
"aaSorting": [[ 0, "desc" ]],
"info": true, "info": true,
"autoWidth": true "autoWidth": true