CHANGE_TRACKER_ISSUE
This commit is contained in:
parent
75e6d7653c
commit
dfa592d764
@ -1,250 +1,252 @@
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
<style>
|
||||
.dataTables_filter input {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #00d976;;
|
||||
border-color: #00d976;;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- 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: #00d976;"><b>Report - Month-wise-Inward(<?php echo $mont; ?>)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center">Supplier Name</th>
|
||||
<th style="text-align:center">Material Name</th>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Total Value (₹)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($month)){
|
||||
$tr3=0;
|
||||
$tr4=0;
|
||||
$ab = $this->input->get('ab');
|
||||
$last = $this->input->get('dat');
|
||||
$new = date("F",strtotime($last))."\n";
|
||||
foreach($month as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>&m=<?php echo $new;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tr3= $tr3 + round($rel->quantity);
|
||||
echo round($rel->quantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tr4= $tr4 + number_format($rel->total,2,'.','');
|
||||
echo number_format($rel->total,2,'.','');?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;">
|
||||
<strong><?php echo 'Total'; ?></strong>
|
||||
</td>
|
||||
<td style="text-align:center;">
|
||||
<?php echo ''; ?>
|
||||
</td>
|
||||
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo round($tr3);
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tr4,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</section>
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-color: #00d976;
|
||||
;
|
||||
border-color: #00d976;
|
||||
;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- 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: #00d976;"><b>Report - Month-wise-Inward(<?php echo $mont; ?>)</b></p>
|
||||
</h3>
|
||||
</center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center">Supplier Name</th>
|
||||
<th style="text-align:center">Material Name</th>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Total Value (₹)</th>
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($month)) {
|
||||
$tr3 = 0;
|
||||
$tr4 = 0;
|
||||
$ab = $this->input->get('ab');
|
||||
$last = $this->input->get('dat');
|
||||
$new = date("F", strtotime($last)) . "\n";
|
||||
foreach ($month as $rel) {
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid; ?>&mid=<?php echo $rel->mid; ?>&ab=<?php echo $ab; ?>&m=<?php echo $new; ?>"><?php echo $rel->supplier_name; ?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name; ?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tr3 = $tr3 + round($rel->quantity);
|
||||
echo round($rel->quantity); ?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tr4 = $tr4 + number_format($rel->total, 2, '.', '');
|
||||
echo number_format($rel->total, 2, '.', ''); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;">
|
||||
<strong><?php echo 'Total'; ?></strong>
|
||||
</td>
|
||||
<td style="text-align:center;">
|
||||
<?php echo ''; ?>
|
||||
</td>
|
||||
|
||||
<script>
|
||||
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php {
|
||||
echo round($tr3);
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php {
|
||||
echo number_format($tr4, 2, '.', '');
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"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>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title: $('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
],
|
||||
,
|
||||
"footerCallback": function ( row, data, start, end, display ) {
|
||||
var api = this.api(), data;
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
var intVal = function ( i ) {
|
||||
return typeof i === 'string' ?
|
||||
parseFloat(i.replace(/[^0.00-9.00]+/g,"")*1) :
|
||||
typeof i === 'number' ?
|
||||
parseFloat(i) : 0;
|
||||
};
|
||||
|
||||
TotalQTY = api
|
||||
.column( 2, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 2 ).footer() ).html( TotalQTY.toFixed().bold() );
|
||||
|
||||
TotalVALUE = api
|
||||
.column( 3, { search:'applied' } )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0 );
|
||||
|
||||
$( api.column( 3 ).footer() ).html( TotalVALUE.toFixed(2).bold() );
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
}
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
$( function() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script>
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable({
|
||||
"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>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
title: $('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
],
|
||||
,
|
||||
"footerCallback": function(row, data, start, end, display) {
|
||||
var api = this.api(),
|
||||
data;
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
var intVal = function(i) {
|
||||
return typeof i === 'string' ?
|
||||
parseFloat(i.replace(/[^0.00-9.00]+/g, "") * 1) :
|
||||
typeof i === 'number' ?
|
||||
parseFloat(i) : 0;
|
||||
};
|
||||
|
||||
TotalQTY = api
|
||||
.column(2, {
|
||||
search: 'applied'
|
||||
})
|
||||
.data()
|
||||
.reduce(function(a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0);
|
||||
|
||||
$(api.column(2).footer()).html(TotalQTY.toFixed().bold());
|
||||
|
||||
TotalVALUE = api
|
||||
.column(3, {
|
||||
search: 'applied'
|
||||
})
|
||||
.data()
|
||||
.reduce(function(a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
}, 0);
|
||||
|
||||
$(api.column(3).footer()).html(TotalVALUE.toFixed(2).bold());
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#mySelect').on('change', function() {
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
$(function() {
|
||||
//var dateFormat = "mm/dd/yy",
|
||||
from = $( "#min-date" )
|
||||
.datepicker({
|
||||
dateFormat: "dd-mm-yy",
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
//numberOfMonths: 1
|
||||
|
||||
})
|
||||
.on( "change", function() {
|
||||
to.datepicker("option", "minDate", getDate( this ) );
|
||||
}),
|
||||
to = $( "#max-date" ).datepicker({
|
||||
dateFormat: "dd-mm-yy",
|
||||
from = $("#min-date")
|
||||
.datepicker({
|
||||
dateFormat: "dd-mm-yy",
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
//numberOfMonths: 1
|
||||
|
||||
|
||||
})
|
||||
.on( "change", function() {
|
||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||
.on("change", function() {
|
||||
to.datepicker("option", "minDate", getDate(this));
|
||||
}),
|
||||
to = $("#max-date").datepicker({
|
||||
dateFormat: "dd-mm-yy",
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
//numberOfMonths: 1
|
||||
|
||||
})
|
||||
.on("change", function() {
|
||||
from.datepicker("option", "maxDate", getDate(this));
|
||||
});
|
||||
|
||||
function getDate( element ) {
|
||||
function getDate(element) {
|
||||
var date;
|
||||
|
||||
|
||||
try {
|
||||
date = $.datepicker.parseDate( dateFormat, element.value );
|
||||
|
||||
} catch( error ) {
|
||||
date = $.datepicker.parseDate(dateFormat, element.value);
|
||||
|
||||
} catch (error) {
|
||||
date = null;
|
||||
}
|
||||
|
||||
return date;
|
||||
}
|
||||
} );
|
||||
});
|
||||
|
||||
function Reset()
|
||||
{
|
||||
$('#mySelect').val('');
|
||||
|
||||
}
|
||||
function Reset() {
|
||||
$('#mySelect').val('');
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
@ -830,7 +830,7 @@
|
||||
onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3" style="margin-top: 18px;">
|
||||
<div class="form-group">
|
||||
<span for="ESI_Rate">ESI Rate(%)</span>
|
||||
<font color="Red">*</font>
|
||||
|
||||
@ -55,6 +55,24 @@
|
||||
<form role="form" id="addemppaydate" action="<?php echo base_url() ?>emppaydate/addNewemppay" method="post" name="addform">
|
||||
<div class="box-body">
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
@ -269,7 +287,7 @@
|
||||
$('#Loan_Amount').val("0.00");
|
||||
$('#paid_due').val(0);
|
||||
$('#Paid_Amount').val("0.00");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,13 @@ if (!empty($EmpCount)) {
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
@media (min-width: 991.98px) {
|
||||
.avatar-title.bg-soft-primary.rounded {
|
||||
background-color: 'black';
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<!-- Dashboard for Account department-->
|
||||
@ -630,42 +636,50 @@ if (!empty($EmpCount)) {
|
||||
<!-- Content Header (Page header) -->
|
||||
<!-- <section class="content-header"> -->
|
||||
<!-- <h3>Admin Dashboard</h3> -->
|
||||
<div class="row">
|
||||
<div class="col-12 text-right" style="height: 75px;">
|
||||
<a href="javascript:void(0)" type="button" title="Sync With Zoho Books" class="btn btn-success" onclick="synczohobooks()">
|
||||
<i class="fas fa-sync-alt"></i> <!-- <img src="<?php echo base_url(); ?>public/new_assets/images/zoho_sync.png" alt="Sync Icon" style="width: 20px; height: 20px;"> -->
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- </section> -->
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<br><br>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-3 col-md-3">
|
||||
<div class="col-12 text-right" style="height: 75px;">
|
||||
<a href="javascript:void(0)" type="button" title="Sync With Zoho Books" class="btn btn-success" onclick="synczohobooks()">
|
||||
<i class="fas fa-sync-alt"></i> <!-- <img src="<?php echo base_url(); ?>public/new_assets/images/zoho_sync.png" alt="Sync Icon" style="width: 20px; height: 20px;"> -->
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<h5 class="text-muted font-weight-normal mt-0 text-truncate" title="User Registrations">User Registrations</h5>
|
||||
<h3 class="my-2 py-1"><span data-plugin="counterup"><?php $users = isset($UserCount[0]->users) ? $UserCount[0]->users : 0; ?>
|
||||
<h3><?= $users; ?></h3>
|
||||
</span></h3>
|
||||
<p class="mb-0 text-muted">
|
||||
<?php $employees = isset($EmpCount[0]->EmpCount) ? $EmpCount[0]->EmpCount : 0; ?>
|
||||
<?php echo $employees > 1 ? '<small>' . $employees . ' Employees </small>' : ($employees == 1 ? '<small>' . $employees . ' Employee</small>' : ''); ?></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="avatar-sm">
|
||||
<span class="avatar-title bg-soft-primary rounded">
|
||||
<a href="<?php echo base_url(); ?>userListing"> <i class="fe-arrow-right" style="color:black;">
|
||||
</i>
|
||||
</a>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<h5 class="text-muted font-weight-normal mt-0 text-truncate" title="User Registrations">User Registrations</h5>
|
||||
<h3 class="my-2 py-1"><span data-plugin="counterup"><?php $users = isset($UserCount[0]->users) ? $UserCount[0]->users : 0; ?>
|
||||
<h3><?= $users; ?></h3>
|
||||
</span></h3>
|
||||
<p class="mb-0 text-muted">
|
||||
<?php $employees = isset($EmpCount[0]->EmpCount) ? $EmpCount[0]->EmpCount : 0; ?>
|
||||
<?php echo $employees > 1 ? '<small>' . $employees . ' Employees </small>' : ($employees == 1 ? '<small>' . $employees . ' Employee</small>' : ''); ?></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="avatar-sm">
|
||||
<span class="avatar-title bg-soft-primary rounded">
|
||||
<a href="<?php echo base_url(); ?>userListing"> <i class="fe-arrow-right" style="color:black;">
|
||||
</i>
|
||||
</a>
|
||||
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
|
||||
@ -7,6 +7,36 @@ if (empty($Status)) {
|
||||
?>
|
||||
|
||||
<style>
|
||||
/* Default minimized state */
|
||||
.supplier-content {
|
||||
max-width: 150px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
cursor: pointer;
|
||||
height: 20px;
|
||||
/* Minimized height */
|
||||
transition: height 0.3s ease-out;
|
||||
/* Smooth transition */
|
||||
}
|
||||
|
||||
/* Expanded state with fixed height and scrolling */
|
||||
.supplier-content.expand {
|
||||
height: 100px;
|
||||
/* Fixed height for expanded state */
|
||||
white-space: normal;
|
||||
/* Allows wrapping */
|
||||
overflow-y: auto;
|
||||
/* Enable vertical scrolling */
|
||||
transition: height 0.3s ease-in;
|
||||
/* Smooth transition for height */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.table-bordered>thead>tr>th,
|
||||
.table-bordered>tbody>tr>th,
|
||||
.table-bordered>tfoot>tr>th,
|
||||
@ -92,21 +122,21 @@ if (empty($Status)) {
|
||||
|
||||
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Purchase Order Approve List</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Purchase Order Approve List</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
|
||||
<input type="hidden" name="table" value="requisition">
|
||||
<label for="fromDate">From:</label>
|
||||
@ -119,9 +149,9 @@ if (empty($Status)) {
|
||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||
<div class="error" id="error"></div>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<table id="po_release" class="table dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
<div class="card-body">
|
||||
<table id="po_release" class="table dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>PO Date</th>
|
||||
<th>Purchase Order Number</th>
|
||||
@ -140,107 +170,110 @@ if (empty($Status)) {
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (!empty($AppList)) {
|
||||
$index = 0;
|
||||
foreach ($AppList as $record) {
|
||||
$index = $index + 1;
|
||||
//echo $index;
|
||||
?>
|
||||
<tr id="<?php echo $index ?>">
|
||||
|
||||
<td align="right" style="width:75px"><?php $podt = new DateTime($record->PODate);
|
||||
$PODate = $podt->format('d-m-Y');
|
||||
echo $PODate;
|
||||
?></td>
|
||||
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->RType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>"><u><?php echo $record->PONO ?> </td>
|
||||
<td><?php echo $record->RType ?> </td>
|
||||
<td><?php echo $record->CostCenterName ?> </td>
|
||||
<!-- <td><?php // echo $record->CostCenterCode
|
||||
?></td> -->
|
||||
<td><?php echo $record->SupplierName ?></td>
|
||||
<td><?php echo $record->FirstName ?></td>
|
||||
<td><?php echo $record->DepartmentName ?></td>
|
||||
<!-- <td align="right"><?php // $Cdt = new DateTime($record->CreatedDate);
|
||||
// $CreatedDate = $Cdt->format('d-m-Y');
|
||||
// echo $CreatedDate;
|
||||
?></td> -->
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (!empty($AppList)) {
|
||||
$index = 0;
|
||||
foreach ($AppList as $record) {
|
||||
$index = $index + 1;
|
||||
//echo $index;
|
||||
?>
|
||||
<tr id="<?php echo $index ?>">
|
||||
<td><?php $podt = new DateTime($record->PODate);
|
||||
$PODate = $podt->format('d-m-Y');
|
||||
echo $PODate;
|
||||
?></td>
|
||||
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->RType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>"><u><?php echo $record->PONO ?> </td>
|
||||
<td><?php echo $record->RType ?> </td>
|
||||
<td><?php echo $record->CostCenterName ?> </td>
|
||||
<!-- <td><?php // echo $record->CostCenterCode
|
||||
?></td> -->
|
||||
<td class="supplier-name" style="text-wrap: balance;">
|
||||
<div class="supplier-content">
|
||||
<?php echo $record->SupplierName ?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo $record->FirstName ?></td>
|
||||
<td><?php echo $record->DepartmentName ?></td>
|
||||
<!-- <td align="right"><?php // $Cdt = new DateTime($record->CreatedDate);
|
||||
// $CreatedDate = $Cdt->format('d-m-Y');
|
||||
// echo $CreatedDate;
|
||||
?></td> -->
|
||||
|
||||
|
||||
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
||||
<td><?php echo $record->TotalOrderValue ?></td>
|
||||
|
||||
|
||||
<td><?php echo $record->Approver ?></td>
|
||||
<td><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
|
||||
'PO RELEASED' => 'PO APPROVED',
|
||||
];
|
||||
<td><?php echo $record->Approver ?></td>
|
||||
<td><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
|
||||
'PO RELEASED' => 'PO APPROVED',
|
||||
];
|
||||
|
||||
if (isset($record->StatusName) && !empty($record->StatusName)) {
|
||||
if (isset($statusMappings[$record->StatusName])) {
|
||||
echo $statusMappings[$record->StatusName];
|
||||
} else {
|
||||
echo $record->StatusName;
|
||||
if (isset($record->StatusName) && !empty($record->StatusName)) {
|
||||
if (isset($statusMappings[$record->StatusName])) {
|
||||
echo $statusMappings[$record->StatusName];
|
||||
} else {
|
||||
echo $record->StatusName;
|
||||
}
|
||||
} else {
|
||||
echo "Status not provided";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?></td>
|
||||
|
||||
|
||||
<?php
|
||||
// if($record->StatusName == 'RELEASER ONHOLD' or $record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){
|
||||
if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) {
|
||||
|
||||
?>
|
||||
<td>
|
||||
|
||||
<select name="selectId" id="selectId" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
|
||||
<option value="-1">Select Action</option>
|
||||
<!-- <option value="1">Release</option> -->
|
||||
<option value="1">Approve And Release</option>
|
||||
<option value="2">OnHold</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<?php } else {
|
||||
echo "<td><center>-</center></td>";
|
||||
} ?>
|
||||
|
||||
<td contenteditable="true" id="remarks<?php echo $index; ?>"><?php
|
||||
|
||||
if ($record->Remarks == '') {
|
||||
} else {
|
||||
echo $record->Remarks;
|
||||
} ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo "Status not provided";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
?></td>
|
||||
|
||||
|
||||
<?php
|
||||
// if($record->StatusName == 'RELEASER ONHOLD' or $record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){
|
||||
if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) {
|
||||
|
||||
?>
|
||||
<td>
|
||||
|
||||
<select name="selectId" id="selectId" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
|
||||
<option value="-1">Select Action</option>
|
||||
<!-- <option value="1">Release</option> -->
|
||||
<option value="1">Approve And Release</option>
|
||||
<option value="2">OnHold</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<?php } else {
|
||||
echo "<td><center>-</center></td>";
|
||||
} ?>
|
||||
|
||||
<td contenteditable="true" id="remarks<?php echo $index; ?>"><?php
|
||||
|
||||
if ($record->Remarks == '') {
|
||||
} else {
|
||||
echo $record->Remarks;
|
||||
} ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@ -328,7 +361,7 @@ if (empty($Status)) {
|
||||
function Reset() {
|
||||
$('#RequisitionStatus').val("-1");
|
||||
$('#SearchDate').val('');
|
||||
}
|
||||
}
|
||||
// <!--JQuery For POP UP and Getting all relevant Data-- >
|
||||
$("#myModal").on("shown.bs.modal", function(e) {
|
||||
var ReqId = $(e.relatedTarget).data('userid');
|
||||
@ -502,7 +535,7 @@ if (empty($Status)) {
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
|
||||
<script>
|
||||
<script>
|
||||
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||
var dateSplit = date.split('/');
|
||||
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||
@ -511,78 +544,96 @@ if (empty($Status)) {
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Initialize the DataTable
|
||||
var table = $('#po_release').DataTable({
|
||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||
],
|
||||
pageLength: 10, // Default rows per page
|
||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
||||
responsive: true, // Responsive table
|
||||
order: [], // Default ordering (column index 0, descending)
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).ready(function() {
|
||||
// Initialize the DataTable
|
||||
var table = $('#po_release').DataTable({
|
||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||
],
|
||||
pageLength: 10, // Default rows per page
|
||||
lengthMenu: [
|
||||
[10, 20, 30, 50, -1],
|
||||
[10, 20, 30, 50, "All"]
|
||||
], // Rows per page options
|
||||
responsive: true, // Responsive table
|
||||
order: [], // Default ordering (column index 0, descending)
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
|
||||
}
|
||||
},
|
||||
autoWidth: true
|
||||
});
|
||||
|
||||
// Date range filter function
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex) {
|
||||
var fromDate = $('#fromDate').val();
|
||||
var toDate = $('#toDate').val();
|
||||
|
||||
if (!fromDate || !toDate) {
|
||||
return true; // If no dates selected, don't filter
|
||||
}
|
||||
|
||||
var dateStr = data[0]; // Assuming the date is in the first column
|
||||
var dateParts = dateStr.split("-");
|
||||
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||
|
||||
var startDate = new Date(fromDate);
|
||||
var endDate = new Date(toDate);
|
||||
|
||||
// Adjust startDate to include the day before the selected fromDate
|
||||
startDate.setDate(startDate.getDate() - 1);
|
||||
|
||||
// Ensure endDate includes the entire end date by setting time to the end of the day
|
||||
endDate.setHours(23, 59, 59, 999);
|
||||
// Date range filter function
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex) {
|
||||
var fromDate = $('#fromDate').val();
|
||||
var toDate = $('#toDate').val();
|
||||
|
||||
// Return true if the date is within the range
|
||||
return date >= startDate && date <= endDate;
|
||||
}
|
||||
);
|
||||
if (!fromDate || !toDate) {
|
||||
return true; // If no dates selected, don't filter
|
||||
}
|
||||
|
||||
// Handle form submission for the date range filter
|
||||
$("#DateRangeFilter").submit(function(e) {
|
||||
e.preventDefault();
|
||||
table.draw(); // Redraw the table to apply the filter
|
||||
});
|
||||
var dateStr = data[0]; // Assuming the date is in the first column
|
||||
var dateParts = dateStr.split("-");
|
||||
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||
|
||||
// Reset button functionality
|
||||
$("#resetButton").click(function() {
|
||||
$("#fromDate").val('');
|
||||
$("#toDate").val('');
|
||||
table.draw(); // Redraw the table to clear the filter
|
||||
});
|
||||
var startDate = new Date(fromDate);
|
||||
var endDate = new Date(toDate);
|
||||
|
||||
// Automatically focus and open the To Date picker when From Date is selected
|
||||
document.getElementById('fromDate').addEventListener('change', function() {
|
||||
var fromDate = this.value;
|
||||
var toDateInput = document.getElementById('toDate');
|
||||
|
||||
// Set the min attribute of the To Date input to the selected From Date
|
||||
toDateInput.min = fromDate;
|
||||
// Adjust startDate to include the day before the selected fromDate
|
||||
startDate.setDate(startDate.getDate() - 1);
|
||||
|
||||
// Optionally reset the To Date input if the current value is before the new min date
|
||||
if (toDateInput.value < fromDate) {
|
||||
toDateInput.value = fromDate;
|
||||
}
|
||||
});
|
||||
});
|
||||
// Ensure endDate includes the entire end date by setting time to the end of the day
|
||||
endDate.setHours(23, 59, 59, 999);
|
||||
|
||||
// Return true if the date is within the range
|
||||
return date >= startDate && date <= endDate;
|
||||
}
|
||||
);
|
||||
|
||||
// Handle form submission for the date range filter
|
||||
$("#DateRangeFilter").submit(function(e) {
|
||||
e.preventDefault();
|
||||
table.draw(); // Redraw the table to apply the filter
|
||||
});
|
||||
|
||||
// Reset button functionality
|
||||
$("#resetButton").click(function() {
|
||||
$("#fromDate").val('');
|
||||
$("#toDate").val('');
|
||||
table.draw(); // Redraw the table to clear the filter
|
||||
});
|
||||
|
||||
// Automatically focus and open the To Date picker when From Date is selected
|
||||
document.getElementById('fromDate').addEventListener('change', function() {
|
||||
var fromDate = this.value;
|
||||
var toDateInput = document.getElementById('toDate');
|
||||
|
||||
// Set the min attribute of the To Date input to the selected From Date
|
||||
toDateInput.min = fromDate;
|
||||
|
||||
// Optionally reset the To Date input if the current value is before the new min date
|
||||
if (toDateInput.value < fromDate) {
|
||||
toDateInput.value = fromDate;
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.supplier-content').on('click', function() {
|
||||
var $this = $(this);
|
||||
|
||||
if (!$this.hasClass('expand')) {
|
||||
// Expand: Set to fixed height with scroll
|
||||
$this.addClass('expand');
|
||||
} else {
|
||||
// Collapse: Reset to minimized height
|
||||
// $this.css('height', '20px').removeClass('expand');
|
||||
$this.removeClass('expand');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -3,15 +3,51 @@
|
||||
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$(document).ready(function() {
|
||||
// Initialize the datepicker with onSelect event
|
||||
$("#hdate").datepicker({
|
||||
minDate: null,
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-100:+0'
|
||||
yearRange: '-100:+0',
|
||||
});
|
||||
|
||||
|
||||
function isValidDateFormat(date) {
|
||||
var datePattern = /^\d{2}-\d{2}-\d{4}$/;
|
||||
var altDatePattern = /^\d{2}\/\d{2}\/\d{4}$/;
|
||||
return datePattern.test(date) || altDatePattern.test(date);
|
||||
}
|
||||
|
||||
function convertToDDMMYY(date) {
|
||||
if (date.includes("/")) {
|
||||
var parts = date.split("/");
|
||||
return parts[1] + '-' + parts[0] + '-' + parts[2];
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
// Handle manual input change for the date
|
||||
$("#hdate").on('change', function() {
|
||||
var selectedDate = $(this).val(); // Get the date entered manually (string)
|
||||
if (selectedDate) {
|
||||
if (isValidDateFormat(selectedDate)) {
|
||||
selectedDate = convertToDDMMYY(selectedDate);
|
||||
var dateParts = selectedDate.split("-");
|
||||
var year = dateParts[2];
|
||||
var yearNumber = parseInt(year, 10);
|
||||
console.log("Year as a number: " + yearNumber);
|
||||
$('#page-title-year-selected').html(yearNumber);
|
||||
} else {
|
||||
console.log("Invalid date format. Please enter in 'dd-mm-yy' format.");
|
||||
}
|
||||
} else {
|
||||
console.log("No date selected or entered.");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('html').bind('keypress', function(e) {
|
||||
//alert('Key Pressed');
|
||||
if (e.keyCode == 13) {
|
||||
@ -35,13 +71,15 @@
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"> Public Holiday Information - <?php echo date('Y'); ?></h4>
|
||||
<!-- <h4 class="page-title"> Public Holiday Information- <span id="page-title-year-selected"><?php echo date('Y'); ?></span></h4> -->
|
||||
<h4 class="page-title"> Public Holiday Information</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<br>
|
||||
<div class="row" style="padding-left: 26px;">
|
||||
<div class="col-md-3">
|
||||
<span>Holiday Name : </span>
|
||||
@ -145,6 +183,7 @@
|
||||
});
|
||||
tr.parentNode.removeChild(tr);
|
||||
}
|
||||
|
||||
$('#Add').click(function() {
|
||||
var index = $('#phdays tr').length;
|
||||
var H_name = $('#hname').val();
|
||||
@ -163,11 +202,10 @@
|
||||
});
|
||||
|
||||
$('#submit').click(function() {
|
||||
|
||||
var jsondata = $('#phdays').tableToJSON();
|
||||
var jsondata = JSON.stringify(jsondata);
|
||||
|
||||
$('#content').loader('show');
|
||||
// $('#content').loader('show');
|
||||
$.ajax({
|
||||
data: {
|
||||
param1: jsondata
|
||||
@ -176,11 +214,13 @@
|
||||
url: "<?php echo base_url() ?>monthlypay/savePublicHolidays",
|
||||
|
||||
success: function(data) {
|
||||
$('#content').loader('hide');
|
||||
// $('#content').loader('hide');
|
||||
alert(data);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// $('#page-title-year-selected')
|
||||
</script>
|
||||
@ -1547,7 +1547,7 @@ function appendExistingFilesFileds(data){
|
||||
<input type="text" id="file_name" name="file_name[]" maxlength="255" class="form-control" value="${data != null && data != '' ? data.file_name : ''}">
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<span for="emp_file">File</span>
|
||||
<label class="col-form-label" for="emp_file">File</label>
|
||||
<input type="file" id="emp_file" name="emp_file[]" class="form-control">
|
||||
</div>
|
||||
<div class="form-group col-md-4 p-4">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user