Report Menu Added
This commit is contained in:
parent
f00ece6804
commit
0f36f570c5
208
application/views/Report_POreleased.php
Normal file
208
application/views/Report_POreleased.php
Normal file
@ -0,0 +1,208 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($rel_po))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Order Value - Released</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input" >
|
||||
<div class="input-group-addon"><b>Total Order Value From:</b></div>
|
||||
<input type="number" id="min" class="form-control date-range-filter" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<input type="number" id="max" class="form-control date-range-filter" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()"><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input">
|
||||
<div class="input-group-addon"><b>Released Date From:</b></div>
|
||||
<input type="text" id="min-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<input type="text" id="max-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>report/export_relPO">Export ReleasedPO-Order value <i class="fa fa-download"aira-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="req" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>PO NO</th>
|
||||
<th>PO Type</th>
|
||||
<th>Created Date</th>
|
||||
<th>Released Date</th>
|
||||
<th>Requested Department</th>
|
||||
<th>Total Order Value</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($rel_po)){
|
||||
foreach($rel_po as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->PONO?></span></td>
|
||||
<td><span><?php echo $rel->POType?></span></td>
|
||||
<td align="right"><span><?php $date = new DateTime($rel->CreatedDate);echo $date->format('Y-m-d'); ?></span></td>
|
||||
<td align="right"><span><?php $date = new DateTime($rel->ReleasedDate);echo $date->format('Y-m-d'); ?></span></td>
|
||||
<td><span><?php echo $rel->Dept_Name?></span></td>
|
||||
<td align="right"><span><?php echo $rel->TotalOrderValue?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
table = $('#req').DataTable
|
||||
({
|
||||
paging: true,
|
||||
info: true
|
||||
|
||||
});
|
||||
|
||||
|
||||
$( function() {
|
||||
var dateFormat = "mm/dd/yy",
|
||||
from = $( "#min-date" )
|
||||
.datepicker({
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 1
|
||||
})
|
||||
.on( "change", function() {
|
||||
to.datepicker( "option", "minDate", getDate( this ) );
|
||||
}),
|
||||
to = $( "#max-date" ).datepicker({
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 1
|
||||
})
|
||||
.on( "change", function() {
|
||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||
});
|
||||
|
||||
function getDate( element ) {
|
||||
var date;
|
||||
try {
|
||||
date = $.datepicker.parseDate( dateFormat, element.value );
|
||||
} catch( error ) {
|
||||
date = null;
|
||||
}
|
||||
|
||||
return date;
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
//$('.input-daterange').each(function() {
|
||||
// $(this).datepicker('clearDates');
|
||||
//});
|
||||
|
||||
|
||||
// Extend dataTables search
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex) {
|
||||
var min = $('#min-date').val();
|
||||
var max = $('#max-date').val();
|
||||
var ReleasedDate = data[3] || 0; // Our date column in the table
|
||||
|
||||
if (
|
||||
(min == "" || max == "") ||
|
||||
(moment(ReleasedDate).isSameOrAfter(min) && moment(ReleasedDate).isSameOrBefore(max))
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
// Re-draw the table when the a date range filter changes
|
||||
$('.filter1').change(function() {
|
||||
table.draw();
|
||||
});
|
||||
|
||||
$('#my-table_filter').hide();
|
||||
|
||||
//total order value range
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function( settings, data, dataIndex ) {
|
||||
var min = parseInt( $('#min').val(), 10 );
|
||||
var max = parseInt( $('#max').val(), 10 );
|
||||
var TotalOrderValue = parseFloat( data[5] ) || 0;
|
||||
|
||||
if ( ( isNaN( min ) && isNaN( max ) ) ||
|
||||
( isNaN( min ) && TotalOrderValue <= max ) ||
|
||||
( min <= TotalOrderValue && isNaN( max ) ) ||
|
||||
( min <= TotalOrderValue && TotalOrderValue <= max ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$(document).ready(function() {
|
||||
//var table = $('#qdetails').DataTable();
|
||||
|
||||
// Event listener to the two range filtering inputs to redraw on input
|
||||
$('#min, #max').keyup( function() {
|
||||
table.draw();
|
||||
} );
|
||||
} );
|
||||
//for clear button
|
||||
function Reset()
|
||||
{
|
||||
$('#min').val('');
|
||||
$('#max').val('');
|
||||
$('#min-date').val('');
|
||||
$('#max-date').val('');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
117
application/views/Report_costcenter.php
Normal file
117
application/views/Report_costcenter.php
Normal file
@ -0,0 +1,117 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($ccrpt))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cost Center</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="col-md-3">
|
||||
<div class="input-group input-daterange input">
|
||||
<div class="input-group-addon"><b>Budget Year:</b></div>
|
||||
<select id="mySelect" >
|
||||
<option value=""></option>
|
||||
<option value="2017 - 2018">2017 - 2018</option>
|
||||
<option value="2018 - 2019">2018 - 2019</option>
|
||||
<option value="2019 - 2020">2019 - 2020</option>
|
||||
<option value="2016">2016</option>
|
||||
</select>
|
||||
|
||||
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>report/export_ccr">Export Cost Center Report <i class="fa fa-download"aira-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Cost Center Code</th>
|
||||
<th>Cost Center Name </th>
|
||||
<th>Department</th>
|
||||
<th>Budget Type</th>
|
||||
<th>Budget Year</th>
|
||||
<th>Utilized Amount</th>
|
||||
<th>Balance Amount</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($ccrpt)){
|
||||
foreach($ccrpt as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->Cost_Center_Code?></span></td>
|
||||
<td><span><?php echo $rel->Cost_Center_Name?></span></td>
|
||||
<td><span><?php echo $rel->Dept_Name?></span></td>
|
||||
<td><span><?php echo $rel->BudgetType?></span></td>
|
||||
<td><span><?php echo $rel->BudgetYear?></span></td>
|
||||
<td><span><?php echo $rel->Util_Amount?></span></td>
|
||||
<td><span><?php echo $rel->Avlbl_Amt?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
table = $('#cc').DataTable
|
||||
({
|
||||
paging: true,
|
||||
info: true
|
||||
|
||||
});
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
function Reset()
|
||||
{
|
||||
$('#mySelect').val('');
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
208
application/views/Report_openorder.php
Normal file
208
application/views/Report_openorder.php
Normal file
@ -0,0 +1,208 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($open_po))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Open Orders - Pending</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input" >
|
||||
<div class="input-group-addon"><b>Total Order Value From:</b></div>
|
||||
<input type="number" id="min" class="form-control date-range-filter" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<input type="number" id="max" class="form-control date-range-filter" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()"><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input">
|
||||
<div class="input-group-addon"><b>Released Date From:</b></div>
|
||||
<input type="text" id="min-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<input type="text" id="max-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>report/export_openorder">Export ReleasedPO-Order value <i class="fa fa-download"aira-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="req" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>PO NO</th>
|
||||
<th>PO Type</th>
|
||||
<th>Created Date</th>
|
||||
<th>Approved Date</th>
|
||||
<th>Requested Department</th>
|
||||
<th>Total Order Value</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($open_po)){
|
||||
foreach($open_po as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->PONO?></span></td>
|
||||
<td><span><?php echo $rel->POType?></span></td>
|
||||
<td align="right"><span><?php $date = new DateTime($rel->CreatedDate);echo $date->format('Y-m-d'); ?></span></td>
|
||||
<td align="right"><span><?php $date = new DateTime($rel->ApprovedDate);echo $date->format('Y-m-d'); ?></span></td>
|
||||
<td><span><?php echo $rel->Dept_Name?></span></td>
|
||||
<td align="right"><span><?php echo $rel->TotalOrderValue?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
table = $('#req').DataTable
|
||||
({
|
||||
paging: true,
|
||||
info: true
|
||||
|
||||
});
|
||||
|
||||
|
||||
$( function() {
|
||||
var dateFormat = "mm/dd/yy",
|
||||
from = $( "#min-date" )
|
||||
.datepicker({
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 1
|
||||
})
|
||||
.on( "change", function() {
|
||||
to.datepicker( "option", "minDate", getDate( this ) );
|
||||
}),
|
||||
to = $( "#max-date" ).datepicker({
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 1
|
||||
})
|
||||
.on( "change", function() {
|
||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||
});
|
||||
|
||||
function getDate( element ) {
|
||||
var date;
|
||||
try {
|
||||
date = $.datepicker.parseDate( dateFormat, element.value );
|
||||
} catch( error ) {
|
||||
date = null;
|
||||
}
|
||||
|
||||
return date;
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
//$('.input-daterange').each(function() {
|
||||
// $(this).datepicker('clearDates');
|
||||
//});
|
||||
|
||||
|
||||
// Extend dataTables search
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex) {
|
||||
var min = $('#min-date').val();
|
||||
var max = $('#max-date').val();
|
||||
var ReleasedDate = data[2] || 0; // Our date column in the table
|
||||
|
||||
if (
|
||||
(min == "" || max == "") ||
|
||||
(moment(ReleasedDate).isSameOrAfter(min) && moment(ReleasedDate).isSameOrBefore(max))
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
// Re-draw the table when the a date range filter changes
|
||||
$('.filter1').change(function() {
|
||||
table.draw();
|
||||
});
|
||||
|
||||
$('#my-table_filter').hide();
|
||||
|
||||
//total order value range
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function( settings, data, dataIndex ) {
|
||||
var min = parseInt( $('#min').val(), 10 );
|
||||
var max = parseInt( $('#max').val(), 10 );
|
||||
var TotalOrderValue = parseFloat( data[5] ) || 0;
|
||||
|
||||
if ( ( isNaN( min ) && isNaN( max ) ) ||
|
||||
( isNaN( min ) && TotalOrderValue <= max ) ||
|
||||
( min <= TotalOrderValue && isNaN( max ) ) ||
|
||||
( min <= TotalOrderValue && TotalOrderValue <= max ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$(document).ready(function() {
|
||||
//var table = $('#qdetails').DataTable();
|
||||
|
||||
// Event listener to the two range filtering inputs to redraw on input
|
||||
$('#min, #max').keyup( function() {
|
||||
table.draw();
|
||||
} );
|
||||
} );
|
||||
//for clear button
|
||||
function Reset()
|
||||
{
|
||||
$('#min').val('');
|
||||
$('#max').val('');
|
||||
$('#min-date').val('');
|
||||
$('#max-date').val('');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
176
application/views/Report_totalorders.php
Normal file
176
application/views/Report_totalorders.php
Normal file
@ -0,0 +1,176 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($Total))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Total Orders</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input">
|
||||
<div class="input-group-addon"><b>Date From:</b></div>
|
||||
<input type="text" id="min-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<input type="text" id="max-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>report/export_total">Export Total Orders <i class="fa fa-download"aira-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="req" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>podate</th>
|
||||
<th>Department</th>
|
||||
|
||||
<th>PO Created</th>
|
||||
<th>Approved</th>
|
||||
<th>OnHold</th>
|
||||
<th>Released</th>
|
||||
<th>IGR Created</th>
|
||||
<th>MRIR Approved</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($Total)){
|
||||
foreach($Total as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td align="right"><span><?php $date = new DateTime($rel->podate);echo $date->format('Y-m-d'); ?></span></td>
|
||||
<td><span><?php echo $rel->Dept_Name?></span></td>
|
||||
|
||||
<td align="right"><span><?php echo $rel->PO_Created?></span></td>
|
||||
<td align="right"><span><?php echo $rel->Approved?></span></td>
|
||||
<td align="right"><span><?php echo $rel->Onhold?></span></td>
|
||||
<td align="right"><span><?php echo $rel->Released?></span></td>
|
||||
<td align="right"><span><?php echo $rel->IGR_Created?></span></td>
|
||||
<td align="right"><span><?php echo $rel->MRIR_Approved?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
table = $('#req').DataTable
|
||||
({
|
||||
paging: true,
|
||||
info: true
|
||||
|
||||
});
|
||||
$( function() {
|
||||
var dateFormat = "mm/dd/yy",
|
||||
from = $( "#min-date" )
|
||||
.datepicker({
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 1
|
||||
})
|
||||
.on( "change", function() {
|
||||
to.datepicker( "option", "minDate", getDate( this ) );
|
||||
}),
|
||||
to = $( "#max-date" ).datepicker({
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 1
|
||||
})
|
||||
.on( "change", function() {
|
||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||
});
|
||||
|
||||
function getDate( element ) {
|
||||
var date;
|
||||
try {
|
||||
date = $.datepicker.parseDate( dateFormat, element.value );
|
||||
} catch( error ) {
|
||||
date = null;
|
||||
}
|
||||
|
||||
return date;
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
//$('.input-daterange').each(function() {
|
||||
// $(this).datepicker('clearDates');
|
||||
//});
|
||||
|
||||
|
||||
// Extend dataTables search
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex) {
|
||||
var min = $('#min-date').val();
|
||||
var max = $('#max-date').val();
|
||||
var podate = data[0] || 0; // Our date column in the table
|
||||
|
||||
if (
|
||||
(min == "" || max == "") ||
|
||||
(moment(podate).isSameOrAfter(min) && moment(podate).isSameOrBefore(max))
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
// Re-draw the table when the a date range filter changes
|
||||
$('.filter1').change(function() {
|
||||
table.draw();
|
||||
});
|
||||
|
||||
$('#my-table_filter').hide();
|
||||
function Reset()
|
||||
{
|
||||
|
||||
$('#min-date').val('');
|
||||
$('#max-date').val('');
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
207
application/views/report_pendingreqst.php
Normal file
207
application/views/report_pendingreqst.php
Normal file
@ -0,0 +1,207 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($pending_list))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Total Pending Requests</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input" >
|
||||
<div class="input-group-addon"><b>Aging From:</b></div>
|
||||
<input type="number" id="min" class="form-control date-range-filter" placeholder="From:">
|
||||
<div class="input-group-addon"><b>To</b></div>
|
||||
<input type="number" id="max" class="form-control date-range-filter" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()"><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input">
|
||||
<div class="input-group-addon"><b>Request Date From:</b></div>
|
||||
<input type="text" id="min-date" class="form-control filter1" data-date-format="dd/mm/yyyy" placeholder="From:">
|
||||
<div class="input-group-addon"><b>To</b></div>
|
||||
<input type="text" id="max-date" class="form-control filter1" data-date-format="dd/mm/yyyy" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>report/export_pending">Export pending details <i class="fa fa-download"aira-hidden="true"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="req" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Requistion Date</th>
|
||||
<th>Requistion Number</th>
|
||||
<th>Requested By</th>
|
||||
<th>Department</th>
|
||||
<th>Requistion Type</th>
|
||||
<th>Aging</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($pending_list)){
|
||||
foreach($pending_list as $lis)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td align="right"><span><?php $date = new DateTime($lis->ReqDate);echo $date->format('Y-m-d'); ?></span></td>
|
||||
<td align="right"><span><?php echo $lis->ReqNo?></span></td>
|
||||
<td><span><?php echo $lis->Requestedby?></span></td>
|
||||
<td><span><?php echo $lis->DepartmentName?></span></td>
|
||||
<td><span><?php echo $lis->ReqType?></span></td>
|
||||
<td align="right"><span><?php echo $lis->Aging?></span></td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<script src="<?php echo base_url(); ?>assets/plugins/knob/jquery.knob.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
table = $('#req').DataTable
|
||||
({
|
||||
paging: true,
|
||||
info: true
|
||||
|
||||
});
|
||||
//dateFormat: 'dd-mm-yy'
|
||||
|
||||
$( function() {
|
||||
var dateFormat = "mm/dd/yy",
|
||||
from = $( "#min-date" )
|
||||
.datepicker({
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 1
|
||||
})
|
||||
.on( "change", function() {
|
||||
to.datepicker( "option", "minDate", getDate( this ) );
|
||||
}),
|
||||
to = $( "#max-date" ).datepicker({
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 1
|
||||
})
|
||||
.on( "change", function() {
|
||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||
});
|
||||
|
||||
function getDate( element ) {
|
||||
var date;
|
||||
try {
|
||||
date = $.datepicker.parseDate( dateFormat, element.value );
|
||||
|
||||
} catch( error ) {
|
||||
date = null;
|
||||
}
|
||||
|
||||
return date;
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
//$('.input-daterange').each(function() {
|
||||
// $(this).datepicker('clearDates');
|
||||
//});
|
||||
|
||||
|
||||
// Extend dataTables search
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex) {
|
||||
var min = $('#min-date').val();
|
||||
var max = $('#max-date').val();
|
||||
var ReqDate = data[0] || 0; // Our date column in the table
|
||||
|
||||
if (
|
||||
(min == "" || max == "") ||
|
||||
(moment(ReqDate).isSameOrAfter(min) && moment(ReqDate).isSameOrBefore(max))
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
// Re-draw the table when the a date range filter changes
|
||||
$('.filter1').change(function() {
|
||||
table.draw();
|
||||
});
|
||||
|
||||
$('#my-table_filter').hide();
|
||||
|
||||
//total order value range
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function( settings, data, dataIndex ) {
|
||||
var min = parseInt( $('#min').val(), 10 );
|
||||
var max = parseInt( $('#max').val(), 10 );
|
||||
var Aging = parseFloat( data[5] ) || 0;
|
||||
|
||||
if ( ( isNaN( min ) && isNaN( max ) ) ||
|
||||
( isNaN( min ) && Aging <= max ) ||
|
||||
( min <= Aging && isNaN( max ) ) ||
|
||||
( min <= Aging && Aging <= max ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$(document).ready(function() {
|
||||
//var table = $('#qdetails').DataTable();
|
||||
|
||||
// Event listener to the two range filtering inputs to redraw on input
|
||||
$('#min, #max').keyup( function() {
|
||||
table.draw();
|
||||
} );
|
||||
} );
|
||||
//for clear button
|
||||
function Reset()
|
||||
{
|
||||
$('#min').val('');
|
||||
$('#max').val('');
|
||||
$('#min-date').val('');
|
||||
$('#max-date').val('');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user