Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
fc22fed3ff
@ -1,8 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$("#client_name").select2();
|
$("#client_name").select2();
|
||||||
$("#item_name").select2();
|
$("#item_name").select2();
|
||||||
@ -12,116 +9,98 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||||
<style>
|
<style>
|
||||||
.dataTables_filter input {padding: 4px;}
|
th{
|
||||||
|
width:auto !important;
|
||||||
|
}
|
||||||
|
.dataTables_filter input {
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.dataTables_filter {
|
.dataTables_filter {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: right;
|
float: right;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_paginate {
|
.dataTables_paginate {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: right;
|
float: right;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dt-buttons {
|
div.dt-buttons {
|
||||||
position: relative;
|
position: relative;
|
||||||
float: right;
|
/* float: right; */
|
||||||
|
|
||||||
}
|
}
|
||||||
.btn-success {
|
</style>
|
||||||
background-color: #00d976;;
|
|
||||||
border-color: #00d976;;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
<div class="content-page">
|
||||||
</style>
|
<div class="content">
|
||||||
<div class="content-wrapper">
|
<!-- Start Content-->
|
||||||
<section class="content">
|
<div class="container-fluid">
|
||||||
<div class="row" style="min-height: 600px;">
|
<!-- start page title -->
|
||||||
<!-- Left col -->
|
<div>
|
||||||
<div class="col-md-12">
|
<div class="row">
|
||||||
<!-- TABLE: LATEST ORDERS -->
|
<div class="col-6">
|
||||||
<div class="box box-info">
|
<div class="page-title-box page-title-box-alt">
|
||||||
<div class="box-header with-border">
|
<h4 class="page-title"><b>Report - Pending Purchase Order </b><br><br><?php echo $headline ?></h4>
|
||||||
<center>
|
|
||||||
<h3 class="box-title">
|
|
||||||
<p><b>Report - Pending Purchase Order </b><br><br><?php echo $headline ?></p>
|
|
||||||
</h3>
|
|
||||||
</center>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
</div>
|
||||||
<div class="panel-body">
|
<div class="col-6 text-right">
|
||||||
|
</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;"> -->
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
<form method="post" action="<?php echo base_url("Report_pending_purchase"); ?>">
|
<form method="post" action="<?php echo base_url("Report_pending_purchase"); ?>">
|
||||||
|
<div class="form-group">
|
||||||
<div class="form-group has-feedback">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-4">
|
||||||
<label for="client_name">
|
<label for="client_name">
|
||||||
<?php echo 'Supplier'; ?>
|
<?php echo 'Supplier'; ?>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
|
||||||
<select class="form-control" id="client_name" name="client_name">
|
<select class="form-control" id="client_name" name="client_name">
|
||||||
<option value="">Select Supplier</option>
|
<option value="">Select Supplier</option>
|
||||||
<?php
|
<?php
|
||||||
foreach($cust as $item):
|
foreach ($cust as $item): { ?>
|
||||||
|
<option value="<?php echo $item->SupplierName; ?>"><?php echo $item->SupplierName; ?></option>
|
||||||
{?>
|
<?php }
|
||||||
|
endforeach; ?>
|
||||||
<option value="<?php echo $item->SupplierName;?>"><?php echo $item->SupplierName ; ?></option>
|
|
||||||
|
|
||||||
|
|
||||||
<?php } endforeach; ?>
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-4">
|
||||||
<div class="col-md-4">
|
|
||||||
<label for="client_name">
|
<label for="client_name">
|
||||||
<?php echo'Material'; ?>
|
<?php echo 'Material'; ?>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
|
||||||
<select class="form-control" id="item_name" name="item_name">
|
<select class="form-control" id="item_name" name="item_name">
|
||||||
<option value="">Select Material</option>
|
<option value="">Select Material</option>
|
||||||
<?php
|
<?php
|
||||||
|
foreach ($material as $it): { ?>
|
||||||
|
<option value="<?php echo $it->MaterialName; ?>"><?php echo $it->MaterialName; ?></option>
|
||||||
foreach($material as $it):
|
<?php }
|
||||||
|
endforeach; ?>
|
||||||
{?>
|
|
||||||
|
|
||||||
<option value="<?php echo $it->MaterialName;?>"><?php echo $it->MaterialName ; ?></option>
|
|
||||||
|
|
||||||
|
|
||||||
<?php } endforeach; ?>
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-2">
|
||||||
|
|
||||||
<div class="col-md-2">
|
|
||||||
<label for="to_date">
|
<label for="to_date">
|
||||||
<?php echo 'Year'; ?>
|
<?php echo 'Year'; ?>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
|
||||||
<select class="form-control" id="financialyear" name="financialyear">
|
<select class="form-control" id="financialyear" name="financialyear">
|
||||||
<option value="">Select Year</option>
|
<option value="">Select Year</option>
|
||||||
<?php
|
<?php
|
||||||
|
foreach ($finyear as $item): { ?>
|
||||||
|
<option value="<?php echo $item->financial_year; ?>"><?php echo $item->financial_year; ?></option>
|
||||||
foreach($finyear as $item):
|
<?php }
|
||||||
|
endforeach; ?>
|
||||||
{?>
|
|
||||||
|
|
||||||
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
|
|
||||||
|
|
||||||
|
|
||||||
<?php } endforeach; ?>
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-2">
|
||||||
<div class="col-md-2">
|
|
||||||
<label for="to_date">
|
<label for="to_date">
|
||||||
<?php echo 'Month'; ?>
|
<?php echo 'Month'; ?>
|
||||||
</label>
|
</label>
|
||||||
@ -143,48 +122,57 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
<label for="from_date">
|
<label for="from_date">
|
||||||
<?php echo 'From Date'; ?>
|
<?php echo 'From Date'; ?>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input name="from_date" id="max-date" class="form-control datepicker">
|
<input type="date" name="from_date" id="max-date" class="form-control datepicker">
|
||||||
<span class="input-group-addon">
|
|
||||||
<i class="fa fa-calendar fa-fw"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
|
||||||
<div class="col-md-4">
|
|
||||||
<label for="to_date">
|
<label for="to_date">
|
||||||
<?php echo 'To Date'; ?>
|
<?php echo 'To Date'; ?>
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input name="to_date" id="min-date" class="form-control datepicker">
|
<input type="date" name="to_date" id="min-date" class="form-control datepicker">
|
||||||
<span class="input-group-addon">
|
|
||||||
<i class="fa fa-calendar fa-fw"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 col-md-offset-2"><br>
|
<div class="col-md-2"></div>
|
||||||
|
<div class="col-md-2 text-right"><br>
|
||||||
<input type="submit" class="btn btn-success" name="btn_submit"
|
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||||
value="View Report">
|
value="View Report">
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group has-feedback">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- </form> -->
|
||||||
|
|
||||||
|
<!-- <input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
||||||
|
<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>
|
</form>
|
||||||
|
<table id="cc" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
|
|
||||||
|
<!-- <table class="table table-bordered table-hover" id="asset_list_table" style="background-color:#fff;font-size:12px;"> -->
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="box-body">
|
|
||||||
<div>
|
|
||||||
<table id="cc" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="text-align:center">PO Date</th>
|
<th style="text-align:center" >PO Date</th>
|
||||||
<th style="text-align:center">PO No</th>
|
<th style="text-align:center">PO No</th>
|
||||||
<th style="text-align:center">Supplier Name</th>
|
<th style="text-align:center">Supplier Name</th>
|
||||||
<th style="text-align:center">Material Name</th>
|
<th style="text-align:center">Material Name</th>
|
||||||
@ -193,57 +181,59 @@
|
|||||||
<th style="text-align:center">Received Quantity</th>
|
<th style="text-align:center">Received Quantity</th>
|
||||||
<th style="text-align:center">Pending Quantity</th>
|
<th style="text-align:center">Pending Quantity</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if(!empty($ppurchse)){
|
<?php if (!empty($ppurchse)) {
|
||||||
|
|
||||||
$mvt=0.00;
|
$mvt = 0.00;
|
||||||
$yqt=0.00;
|
$yqt = 0.00;
|
||||||
$yvt=0.00;
|
$yvt = 0.00;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach($ppurchse as $rel)
|
foreach ($ppurchse as $rel) {
|
||||||
{
|
|
||||||
$cat = $rel->category;
|
$cat = $rel->category;
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <td><span>
|
<!-- <td><span>
|
||||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;?>&ab=<?php //echo $ab;?>&mid=<?php //echo $rel->mid;?>"><?php //echo $rel->supplier_name;?></a>
|
<a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;
|
||||||
</span></td>-->
|
?>&ab=<?php //echo $ab;
|
||||||
|
?>&mid=<?php //echo $rel->mid;
|
||||||
|
?>"><?php //echo $rel->supplier_name;
|
||||||
|
?></a>
|
||||||
|
</span></td>-->
|
||||||
<td><span>
|
<td><span>
|
||||||
<?php echo $rel->pdate;?>
|
<?php echo $rel->pdate; ?>
|
||||||
</span></td>
|
</span></td>
|
||||||
<td><span>
|
<td><span>
|
||||||
<?php echo $rel->po;?>
|
<?php echo $rel->po; ?>
|
||||||
</span></td>
|
</span></td>
|
||||||
|
|
||||||
<td><span>
|
<td><span>
|
||||||
|
|
||||||
<?php echo $rel->supplier;?>
|
<?php echo $rel->supplier; ?>
|
||||||
</span></td>
|
</span></td>
|
||||||
<td><span>
|
<td><span>
|
||||||
<?php echo $rel->material;?>
|
<?php echo $rel->material; ?>
|
||||||
</span></td>
|
</span></td>
|
||||||
<td><span>
|
<td><span>
|
||||||
<?php echo $rel->category;?>
|
<?php echo $rel->category; ?>
|
||||||
</span></td>
|
</span></td>
|
||||||
<td style="text-align:right"><span><?php
|
<td style="text-align:right"><span><?php
|
||||||
$mvt= $mvt + round($rel->quantity);
|
$mvt = $mvt + round($rel->quantity);
|
||||||
?>
|
?>
|
||||||
<?php echo round($rel->quantity);?>
|
<?php echo round($rel->quantity); ?>
|
||||||
</span></td>
|
</span></td>
|
||||||
<td style="text-align:right"><span><?php
|
<td style="text-align:right"><span><?php
|
||||||
$yqt= $yqt + round($rel->received);
|
$yqt = $yqt + round($rel->received);
|
||||||
?>
|
?>
|
||||||
<?php echo round($rel->received);?>
|
<?php echo round($rel->received); ?>
|
||||||
</span></td>
|
</span></td>
|
||||||
<td style="text-align:right"><span><?php
|
<td style="text-align:right"><span><?php
|
||||||
$yvt= $yvt + round($rel->pending);
|
$yvt = $yvt + round($rel->pending);
|
||||||
?>
|
?>
|
||||||
<?php echo round($rel->pending);?>
|
<?php echo round($rel->pending); ?>
|
||||||
</span></td>
|
</span></td>
|
||||||
|
|
||||||
|
|
||||||
@ -262,70 +252,56 @@
|
|||||||
|
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<strong>
|
<strong>
|
||||||
<?php
|
<?php {
|
||||||
{
|
|
||||||
echo '';
|
echo '';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<strong>
|
<strong>
|
||||||
<?php
|
<?php {
|
||||||
{
|
|
||||||
echo '';
|
echo '';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<strong>
|
<strong>
|
||||||
<?php
|
<?php {
|
||||||
{
|
|
||||||
echo '';
|
echo '';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<strong>
|
<strong>
|
||||||
<?php
|
<?php {
|
||||||
{
|
|
||||||
echo '';
|
echo '';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<strong>
|
<strong>
|
||||||
<?php
|
<?php {
|
||||||
{
|
|
||||||
echo $mvt;
|
echo $mvt;
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<strong>
|
<strong>
|
||||||
<?php
|
<?php {
|
||||||
{
|
|
||||||
echo $yqt;
|
echo $yqt;
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<strong>
|
<strong>
|
||||||
<?php
|
<?php {
|
||||||
{
|
|
||||||
echo $yvt;
|
echo $yvt;
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
@ -337,103 +313,124 @@
|
|||||||
</tfoot>
|
</tfoot>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
</div> <!-- end card body-->
|
||||||
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> <!-- container -->
|
||||||
<!-- /.box -->
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
<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/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/pdfmake.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.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.html5.min.js"></script>
|
||||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
<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 src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
// Bootstrap datepicker
|
||||||
|
// Set up your table
|
||||||
// Bootstrap datepicker
|
$(document).ready(function() {
|
||||||
// Set up your table
|
// $.fn.dataTable.moment('DD-MM-YYYY');
|
||||||
$(document).ready(function() {
|
// table = $('#cc').DataTable({
|
||||||
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
// "language": {
|
||||||
table = $('#cc').DataTable( {
|
// "emptyTable": "<center> Data Not Found ! </center>"
|
||||||
"language": {
|
|
||||||
"emptyTable": "<center> Data Not Found ! </center>"
|
|
||||||
},
|
|
||||||
"aaSorting": [[ 0, "desc" ]],
|
|
||||||
"pageLength": 10,
|
|
||||||
"lengthMenu": [10, 25, 50, 100],
|
|
||||||
"autoWidth": false,
|
|
||||||
orderCellsTop: true,
|
|
||||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
|
||||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
|
||||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
|
||||||
buttons: [
|
|
||||||
|
|
||||||
// {
|
|
||||||
// extend: 'excelHtml5',
|
|
||||||
// footer: 'true',
|
|
||||||
// //messageTop: $('h3').text(),
|
|
||||||
// title: $('h3').text(),
|
|
||||||
// exportOptions: {
|
|
||||||
// columns: ':visible'
|
|
||||||
// }
|
|
||||||
// },
|
// },
|
||||||
|
// "aaSorting": [
|
||||||
|
// [0, "desc"]
|
||||||
|
// ],
|
||||||
|
// "pageLength": 10,
|
||||||
|
// "lengthMenu": [10, 25, 50, 100],
|
||||||
|
// "autoWidth": false,
|
||||||
|
// orderCellsTop: true,
|
||||||
|
// "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||||
|
// "<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
|
// "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
|
// buttons: [
|
||||||
|
|
||||||
'colvis'
|
// // {
|
||||||
|
// // 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-9]+/g, "") * 1) :
|
||||||
|
// typeof i === 'number' ?
|
||||||
|
// parseFloat(i) : 0;
|
||||||
|
// };
|
||||||
|
|
||||||
|
// TotalOrderedQTY = api
|
||||||
|
// .column(5, {
|
||||||
|
// search: 'applied'
|
||||||
|
// })
|
||||||
|
// .data()
|
||||||
|
// .reduce(function(a, b) {
|
||||||
|
// return intVal(a) + intVal(b);
|
||||||
|
// }, 0);
|
||||||
|
|
||||||
|
// $(api.column(5).footer()).html(TotalOrderedQTY.toFixed().bold());
|
||||||
|
|
||||||
|
// TotalRcvdQTY = api
|
||||||
|
// .column(6, {
|
||||||
|
// search: 'applied'
|
||||||
|
// })
|
||||||
|
// .data()
|
||||||
|
// .reduce(function(a, b) {
|
||||||
|
// return intVal(a) + intVal(b);
|
||||||
|
// }, 0);
|
||||||
|
|
||||||
|
// $(api.column(6).footer()).html(TotalRcvdQTY.toFixed().bold());
|
||||||
|
|
||||||
|
// TotalPendingQTY = api
|
||||||
|
// .column(7, {
|
||||||
|
// search: 'applied'
|
||||||
|
// })
|
||||||
|
// .data()
|
||||||
|
// .reduce(function(a, b) {
|
||||||
|
// return intVal(a) + intVal(b);
|
||||||
|
// }, 0);
|
||||||
|
|
||||||
|
// $(api.column(7).footer()).html(TotalPendingQTY.toFixed().bold());
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#cc').DataTable({
|
||||||
|
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||||
|
buttons: [
|
||||||
|
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||||
],
|
],
|
||||||
"footerCallback": function ( row, data, start, end, display ) {
|
pageLength: 10, // Default rows per page
|
||||||
var api = this.api(), data;
|
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
||||||
|
responsive: true, // Responsive table
|
||||||
// Remove the formatting to get integer data for summation
|
order: [[0, 'desc']], // Default ordering (column index 0, descending)
|
||||||
var intVal = function ( i ) {
|
language: {
|
||||||
return typeof i === 'string' ?
|
paginate: {
|
||||||
parseFloat(i.replace(/[^0-9]+/g,"")*1) :
|
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||||
typeof i === 'number' ?
|
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
|
||||||
parseFloat(i) : 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
TotalOrderedQTY = api
|
|
||||||
.column( 5, { search:'applied' } )
|
|
||||||
.data()
|
|
||||||
.reduce( function (a, b) {
|
|
||||||
return intVal(a) + intVal(b);
|
|
||||||
}, 0 );
|
|
||||||
|
|
||||||
$( api.column( 5 ).footer() ).html( TotalOrderedQTY.toFixed().bold() );
|
|
||||||
|
|
||||||
TotalRcvdQTY = api
|
|
||||||
.column( 6, { search:'applied' } )
|
|
||||||
.data()
|
|
||||||
.reduce( function (a, b) {
|
|
||||||
return intVal(a) + intVal(b);
|
|
||||||
}, 0 );
|
|
||||||
|
|
||||||
$( api.column( 6 ).footer() ).html( TotalRcvdQTY.toFixed().bold() );
|
|
||||||
|
|
||||||
TotalPendingQTY = api
|
|
||||||
.column( 7, { search:'applied' } )
|
|
||||||
.data()
|
|
||||||
.reduce( function (a, b) {
|
|
||||||
return intVal(a) + intVal(b);
|
|
||||||
}, 0 );
|
|
||||||
|
|
||||||
$( api.column( 7 ).footer() ).html( TotalPendingQTY.toFixed().bold() );
|
|
||||||
}
|
}
|
||||||
} );
|
}
|
||||||
} );
|
});
|
||||||
$('#mySelect').on('change',function(){
|
});
|
||||||
|
$('#mySelect').on('change', function() {
|
||||||
|
|
||||||
table
|
table
|
||||||
.column(4)
|
.column(4)
|
||||||
@ -441,9 +438,9 @@ $(document).ready(function() {
|
|||||||
.draw();
|
.draw();
|
||||||
});
|
});
|
||||||
|
|
||||||
$( function() {
|
$(function() {
|
||||||
//var dateFormat = "mm/dd/yy",
|
//var dateFormat = "mm/dd/yy",
|
||||||
from = $( "#min-date" )
|
from = $("#min-date")
|
||||||
.datepicker({
|
.datepicker({
|
||||||
dateFormat: "dd-mm-yy",
|
dateFormat: "dd-mm-yy",
|
||||||
defaultDate: "+0d",
|
defaultDate: "+0d",
|
||||||
@ -451,35 +448,31 @@ $(document).ready(function() {
|
|||||||
//numberOfMonths: 1
|
//numberOfMonths: 1
|
||||||
|
|
||||||
})
|
})
|
||||||
.on( "change", function() {
|
.on("change", function() {
|
||||||
to.datepicker("option", "minDate", getDate( this ) );
|
to.datepicker("option", "minDate", getDate(this));
|
||||||
}),
|
}),
|
||||||
to = $( "#max-date" ).datepicker({
|
to = $("#max-date").datepicker({
|
||||||
dateFormat: "dd-mm-yy",
|
dateFormat: "dd-mm-yy",
|
||||||
defaultDate: "+0d",
|
defaultDate: "+0d",
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
//numberOfMonths: 1
|
//numberOfMonths: 1
|
||||||
|
|
||||||
})
|
})
|
||||||
.on( "change", function() {
|
.on("change", function() {
|
||||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
from.datepicker("option", "maxDate", getDate(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
function getDate( element ) {
|
function getDate(element) {
|
||||||
var date;
|
var date;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
date = $.datepicker.parseDate( dateFormat, element.value );
|
date = $.datepicker.parseDate(dateFormat, element.value);
|
||||||
|
|
||||||
} catch( error ) {
|
} catch (error) {
|
||||||
date = null;
|
date = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
} );
|
});
|
||||||
|
</script>
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,10 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-content-custom-width {
|
.modal-content-custom-width {
|
||||||
width: 75%; /* Adjust the width as needed */
|
width: 75%;
|
||||||
|
/* Adjust the width as needed */
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_paginate {
|
.dataTables_paginate {
|
||||||
@ -38,58 +40,64 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
#Requisition_filter {
|
#Requisition_filter {
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_wrapper .row .col-sm-4 {
|
#Requisition_wrapper .row .col-sm-4 {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_paginate .pagination {
|
#Requisition_paginate .pagination {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
margin: 0 0 15px;
|
margin: 0 0 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_wrapper .row:nth-child(3),
|
#Requisition_wrapper .row:nth-child(3),
|
||||||
#Requisition_wrapper .row:nth-child(1) {
|
#Requisition_wrapper .row:nth-child(1) {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_info {
|
#Requisition_info {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_wrapper {
|
.dataTables_wrapper {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.highlight {
|
span.highlight {
|
||||||
background-color: yellow;
|
background-color: yellow;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.Date-filter-form {
|
.Date-filter-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px; /* Adjust the gap as needed */
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
}
|
}
|
||||||
.Date-filter-form input, .Date-filter-form button {
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Date-filter-form button {
|
.Date-filter-form button {
|
||||||
background-color: #007bff;
|
background-color: #007bff;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Date-filter-form button:hover {
|
.Date-filter-form button:hover {
|
||||||
background-color: #0056b3;
|
background-color: #0056b3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-button {
|
.icon-button {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
@ -97,107 +105,30 @@ span.highlight {
|
|||||||
color: #007bff;
|
color: #007bff;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-button:hover {
|
.icon-button:hover {
|
||||||
color: #0056b3;
|
color: #0056b3;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="content-page">
|
<div class="content-page">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?php $attributes = array('class' => 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form');
|
<?php $attributes = array('class' => 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form');
|
||||||
echo form_open(base_url() . 'purchaseOrder', $attributes); ?>
|
echo form_open(base_url() . 'purchaseOrder', $attributes); ?>
|
||||||
|
|
||||||
<!-- Start Content-->
|
<!-- Start Content-->
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<!-- start page title -->
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="page-title-box page-title-box-alt">
|
|
||||||
<h4 class="page-title">Create Purchase Order from Requistion</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<?php
|
|
||||||
helper('form');
|
|
||||||
$error = session()->getFlashdata('error');
|
|
||||||
if ($error) {
|
|
||||||
?>
|
|
||||||
<div class="alert alert-danger alert-dismissable">
|
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
||||||
<?php echo session()->getFlashdata('error'); ?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
<?php
|
|
||||||
$success = session()->getFlashdata('success');
|
|
||||||
if ($success) {
|
|
||||||
?>
|
|
||||||
<div class="alert alert-success alert-dismissable">
|
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
||||||
<?php echo session()->getFlashdata('success'); ?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
$listErrors = session()->getFlashdata('listErrors');
|
|
||||||
if ($listErrors) { ?>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="alert alert-danger alert-dismissable">
|
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
||||||
<?php echo session()->getFlashdata('listErrors'); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
<div class="col-md-12" style="margin-top: -79px;">
|
|
||||||
<!-- <div class="col-md-3 col-md-offset-9"> -->
|
|
||||||
<p>
|
|
||||||
<div align="right" style="padding-right:0px">
|
|
||||||
<!--<a href="<?php echo base_url(); ?>purchaseorderform/purchaseorder"> -->
|
|
||||||
<!--<button type="button" class="btn btn-success">Create PO</button></a> -->
|
|
||||||
<!--<input type="submit" class="btn btn-success" onclick="return Validate();" value="Create Purchase Order"> -->
|
|
||||||
<a class="btn btn-success" onclick="Validate();">Create Purchase Order</a>
|
|
||||||
<input type="hidden" name="txtReqNo" id="txtReqNo" />
|
|
||||||
<input type="hidden" name="txtReqType" id="txtReqType" />
|
|
||||||
</div>
|
|
||||||
</p>
|
|
||||||
<!-- </div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<span class="Date-filter-form" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
|
|
||||||
<input type="hidden" name="table" value="requisition">
|
|
||||||
<label for="fromDate">From:</label>
|
|
||||||
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
|
||||||
|
|
||||||
<label for="toDate">To:</label>
|
|
||||||
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
|
||||||
|
|
||||||
<button type="button" class="range_search_button" id="DateRangeFilter"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
|
||||||
<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>
|
|
||||||
</span>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="modal fade" id="RequisitionDtlsModal" role="dialog">
|
<div class="modal fade" id="RequisitionDtlsModal" role="dialog">
|
||||||
<div class="modal-dialog" style="vertical-align: middle;width: fit-content">
|
<div class="modal-dialog modal-lg">
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
<form>
|
<form>
|
||||||
<div class="modal-content" style="width:800px">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<center>
|
<center>
|
||||||
<h4> Requisition Details - <label id="SelReqNo" name="SelReqNo"></label> </h4>
|
<h4> Requisition Details - <label id="SelReqNo" name="SelReqNo"></label> </h4>
|
||||||
</center>
|
</center>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -283,6 +214,127 @@ span.highlight {
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="ImportPOCheck" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<center>
|
||||||
|
<h4>Do you want to create an Import PO for this Requisition?</h4>
|
||||||
|
</center>
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row text-center">
|
||||||
|
<div class="col-md-3">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="optImport" id="optImportYes" value="0">
|
||||||
|
<label class="form-check-label" for="optImportYes">YES</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" name="optImport" id="optImportNo" value="1" checked>
|
||||||
|
<label class="form-check-label" for="optImportNo">NO</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="col-md-12 text-center">
|
||||||
|
<a class="btn btn-dark waves-effect waves-light" data-dismiss="modal" style="background-color: gray;border-color: gray;margin-right: 10px;">Cancel</a>
|
||||||
|
<input type="button" class="btn btn-success" onclick="SetImportPO();" value="OK" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- start page title -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="page-title-box page-title-box-alt">
|
||||||
|
<h4 class="page-title">Create Purchase Order from Requistion</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<?php
|
||||||
|
helper('form');
|
||||||
|
$error = session()->getFlashdata('error');
|
||||||
|
if ($error) {
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo session()->getFlashdata('error'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php
|
||||||
|
$success = session()->getFlashdata('success');
|
||||||
|
if ($success) {
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo session()->getFlashdata('success'); ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
$listErrors = session()->getFlashdata('listErrors');
|
||||||
|
if ($listErrors) { ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="alert alert-danger alert-dismissable">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<?php echo session()->getFlashdata('listErrors'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<div class="col-md-12" style="margin-top: -79px;">
|
||||||
|
<!-- <div class="col-md-3 col-md-offset-9"> -->
|
||||||
|
<p>
|
||||||
|
<div align="right" style="padding-right:0px">
|
||||||
|
<!--<a href="<?php echo base_url(); ?>purchaseorderform/purchaseorder"> -->
|
||||||
|
<!--<button type="button" class="btn btn-success">Create PO</button></a> -->
|
||||||
|
<!--<input type="submit" class="btn btn-success" onclick="return Validate();" value="Create Purchase Order"> -->
|
||||||
|
<a class="btn btn-success" onclick="Validate();">Create Purchase Order</a>
|
||||||
|
<input type="hidden" name="txtReqNo" id="txtReqNo" />
|
||||||
|
<input type="hidden" name="txtReqType" id="txtReqType" />
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
<!-- </div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<span class="Date-filter-form" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="button" class="range_search_button" id="DateRangeFilter"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
||||||
|
<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>
|
||||||
|
</span>
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
<table id="create_po_from_requistion" class="table dt-responsive nowrap w-100">
|
<table id="create_po_from_requistion" class="table dt-responsive nowrap w-100">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -291,9 +343,9 @@ span.highlight {
|
|||||||
<th>Requistion Number</th>
|
<th>Requistion Number</th>
|
||||||
<th>Requistion Type </th>
|
<th>Requistion Type </th>
|
||||||
<th>Requested By</th>
|
<th>Requested By</th>
|
||||||
<th>Tot. No. Of Line Items</th>
|
<th>Tot Line Items</th>
|
||||||
<th>Po Created Line Items</th>
|
<th>Po Line Items</th>
|
||||||
<th>Partial PO Created Line Items</th>
|
<th>Partial PO Line Items</th>
|
||||||
<th>New Line Items</th>
|
<th>New Line Items</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Department</th>
|
<th>Department</th>
|
||||||
@ -331,32 +383,7 @@ span.highlight {
|
|||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="modal fade" id="ImportPOCheck" role="dialog">
|
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
|
||||||
<!-- Modal content-->
|
|
||||||
<div class="modal-content modal-content-custom-width">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<h4 class="modal-title">Do You want to create Import PO for this Requistion?</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form>
|
|
||||||
<div class="radio">
|
|
||||||
<label><input type="radio" name="optImport" value="0" id="optImport">YES</label>
|
|
||||||
</div>
|
|
||||||
<div class="radio">
|
|
||||||
<label><input type="radio" name="optImport" value="1" id="optImport" checked="checked">NO</label>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<!--<a class="btn btn-success" ID="Import" onclick="SetImportPO();" style="margin-top: -24px;">-->
|
|
||||||
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
|
||||||
<input type="submit" class="btn btn-success" onclick="SetImportPO();" value="OK" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
</div> <!-- end card -->
|
</div> <!-- end card -->
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
@ -365,103 +392,26 @@ span.highlight {
|
|||||||
</div> <!-- content -->
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var POType = '';
|
$(document).ready(function() {
|
||||||
function SetImportPO() {
|
|
||||||
POType = $("input:radio[name='optImport']:checked").val();
|
|
||||||
$('#ImportPOCheck').modal('hide');
|
|
||||||
$('#txtReqType').val(POType == 0 ? 'IMPORT' : '');
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#ReqDate').val('');
|
|
||||||
var Fromdt = '';
|
|
||||||
var Todt = '';
|
|
||||||
var baseurl = "<?php print base_url(); ?>";
|
|
||||||
|
|
||||||
//Date range picker
|
|
||||||
$('#ReqDate').daterangepicker({
|
|
||||||
locale: {
|
|
||||||
format: 'YYYY/MM/DD'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var coll = [];
|
|
||||||
var RequistionList = {
|
|
||||||
Req: []
|
|
||||||
};
|
|
||||||
|
|
||||||
var Type = '';
|
|
||||||
var i = 0;
|
|
||||||
|
|
||||||
|
|
||||||
function selectReqNo(rowId) {
|
|
||||||
|
|
||||||
console.log("entered");
|
|
||||||
|
|
||||||
ckb = $('#chk' + rowId).is(':checked');
|
|
||||||
var tr = document.getElementById(rowId);
|
|
||||||
var cellval = tr.cells;
|
|
||||||
console.log(cellval)
|
|
||||||
//coo/kie_value_add = {};
|
|
||||||
if (!ckb) {
|
|
||||||
var removeItem = cellval[2].innerText;
|
|
||||||
$.each(RequistionList.Req, function(i, el) {
|
|
||||||
if (this.ReqNo == removeItem) { //Type = '';
|
|
||||||
RequistionList.Req.splice(i, 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
var tr = document.getElementById(rowId);
|
|
||||||
var cellval = tr.cells;
|
|
||||||
|
|
||||||
|
|
||||||
//alert(RequistionList.Req.length);
|
|
||||||
if (RequistionList.Req.length > 0) {
|
|
||||||
console.log("111111111");
|
|
||||||
|
|
||||||
if (Type == cellval[3].innerText) {
|
|
||||||
|
|
||||||
RequistionList.Req.push({
|
|
||||||
"ReqNo": cellval[2].innerText,
|
|
||||||
"ReqType": cellval[3].innerText,
|
|
||||||
"ReqBy": cellval[4].innerText,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.log("333333333");
|
|
||||||
|
|
||||||
alert('Same type of Requistion only can be together.')
|
|
||||||
$('#chk' + rowId).attr('checked', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
RequistionList.Req.push({
|
|
||||||
"ReqNo": cellval[2].innerText,
|
|
||||||
"ReqType": cellval[3].innerText,
|
|
||||||
"ReqBy": cellval[4].innerText,
|
|
||||||
});
|
|
||||||
Type = cellval[3].innerText;
|
|
||||||
|
|
||||||
}
|
|
||||||
i = i + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(JSON.stringify(RequistionList));
|
|
||||||
|
|
||||||
$('#txtReqNo').val(JSON.stringify(RequistionList));
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#RequisitionDtlsModal").on("shown.bs.modal", function(e) {
|
$("#RequisitionDtlsModal").on("shown.bs.modal", function(e) {
|
||||||
var ReqId = $(e.relatedTarget).data('userid');
|
var ReqId = $(e.relatedTarget).data('userid');
|
||||||
$('#SelReqNo').html(ReqId);
|
$('#SelReqNo').html(ReqId);
|
||||||
$('#content').loader('show');
|
// $('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: { id: ReqId },
|
data: {
|
||||||
|
id: ReqId
|
||||||
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
url: "<?php echo base_url() ?>requisitionform/ViewRequest",
|
url: "<?php echo base_url() ?>requisitionform/ViewRequest",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
var getAvalAmt = json.AvilBudAmount;
|
var getAvalAmt = json.AvilBudAmount;
|
||||||
getAvalAmt = getAvalAmt.replace(/\,/g, '');
|
getAvalAmt = getAvalAmt.replace(/\,/g, '');
|
||||||
$("#ReqType").val(json.Requist[0]['ReqType']);
|
$("#ReqType").val(json.Requist[0]['ReqType']);
|
||||||
@ -476,55 +426,21 @@ span.highlight {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function Validate() {
|
|
||||||
var ReqNo = $('#txtReqNo').val();
|
|
||||||
console.log("--------------");
|
|
||||||
|
|
||||||
console.log(ReqNo);
|
|
||||||
|
|
||||||
if (ReqNo.length <= 0) {
|
|
||||||
alert('Please select the Requisition Number to Create Purchase Order');
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
$('#ImportPOCheck').modal('show');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
$('#REQLIST').DataTable({
|
|
||||||
"paging": true,
|
|
||||||
"lengthChange": true,
|
|
||||||
"searching": true,
|
|
||||||
"columnDefs": [{
|
|
||||||
"targets": 1,
|
|
||||||
"type": "date-eu"
|
|
||||||
}],
|
|
||||||
"aaSorting": [
|
|
||||||
[2, "desc"]
|
|
||||||
],
|
|
||||||
"ordering": true,
|
|
||||||
"info": true,
|
|
||||||
"autoWidth": true,
|
|
||||||
"pageLength": 10,
|
|
||||||
"lengthMenu": [10, 25, 50, 100]
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
// Initialize the DataTable
|
|
||||||
var table = $('#create_po_from_requistion').DataTable({
|
var table = $('#create_po_from_requistion').DataTable({
|
||||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||||
buttons: [
|
buttons: [
|
||||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||||
],
|
],
|
||||||
pageLength: 10, // Default rows per page
|
pageLength: 10, // Default rows per page
|
||||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
lengthMenu: [
|
||||||
responsive: true, // Responsive table
|
[10, 20, 30, 50, -1],
|
||||||
order: [[0, 'desc']], // Default ordering (column index 0, descending)
|
[10, 20, 30, 50, "All"]
|
||||||
|
], // Rows per page options
|
||||||
|
responsive: false, // Responsive table
|
||||||
|
order: [
|
||||||
|
// [0, 'desc']
|
||||||
|
], // Default ordering (column index 0, descending)
|
||||||
|
scrollX: true,
|
||||||
language: {
|
language: {
|
||||||
paginate: {
|
paginate: {
|
||||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||||
@ -532,7 +448,12 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('#create_po_from_requistion_wrapper .dataTables_scrollBody').on('mousewheel', function(e) {
|
||||||
|
if (e.originalEvent.deltaY !== 0) {
|
||||||
|
this.scrollLeft += e.originalEvent.deltaY; // Use the vertical scroll to scroll horizontally
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
// Date range filter function
|
// Date range filter function
|
||||||
$.fn.dataTable.ext.search.push(
|
$.fn.dataTable.ext.search.push(
|
||||||
function(settings, data, dataIndex) {
|
function(settings, data, dataIndex) {
|
||||||
@ -588,5 +509,90 @@ $(document).ready(function() {
|
|||||||
toDateInput.value = fromDate;
|
toDateInput.value = fromDate;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var POType = '';
|
||||||
|
|
||||||
|
function SetImportPO() {
|
||||||
|
POType = $("input:radio[name='optImport']:checked").val();
|
||||||
|
$('#ImportPOCheck').modal('hide');
|
||||||
|
$('#txtReqType').val(POType == 0 ? 'IMPORT' : '');
|
||||||
|
$('#CreatePO').submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#ReqDate').val('');
|
||||||
|
var Fromdt = '';
|
||||||
|
var Todt = '';
|
||||||
|
var baseurl = "<?php print base_url(); ?>";
|
||||||
|
//Date range picker
|
||||||
|
// $('#ReqDate').daterangepicker({
|
||||||
|
// locale: {
|
||||||
|
// format: 'YYYY/MM/DD'
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
var coll = [];
|
||||||
|
var RequistionList = {
|
||||||
|
Req: []
|
||||||
|
};
|
||||||
|
|
||||||
|
var Type = '';
|
||||||
|
var i = 0;
|
||||||
|
|
||||||
|
|
||||||
|
function selectReqNo(rowId) {
|
||||||
|
ckb = $('#chk' + rowId).is(':checked');
|
||||||
|
var tr = document.getElementById(rowId);
|
||||||
|
var cellval = tr.cells;
|
||||||
|
console.log(cellval)
|
||||||
|
//coo/kie_value_add = {};
|
||||||
|
if (!ckb) {
|
||||||
|
var removeItem = cellval[2].innerText;
|
||||||
|
$.each(RequistionList.Req, function(i, el) {
|
||||||
|
if (this.ReqNo == removeItem) { //Type = '';
|
||||||
|
RequistionList.Req.splice(i, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var tr = document.getElementById(rowId);
|
||||||
|
var cellval = tr.cells;
|
||||||
|
|
||||||
|
//alert(RequistionList.Req.length);
|
||||||
|
console.log(RequistionList);
|
||||||
|
|
||||||
|
if (RequistionList.Req.length > 0) {
|
||||||
|
if (Type == cellval[3].innerText) {
|
||||||
|
RequistionList.Req.push({
|
||||||
|
"ReqNo": cellval[2].innerText,
|
||||||
|
"ReqType": cellval[3].innerText,
|
||||||
|
"ReqBy": cellval[4].innerText,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
alert('Same type of Requistion only can be together.');
|
||||||
|
$('#chk' + rowId).prop('checked', false); // Properly uncheck the checkbox
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
RequistionList.Req.push({
|
||||||
|
"ReqNo": cellval[2].innerText,
|
||||||
|
"ReqType": cellval[3].innerText,
|
||||||
|
"ReqBy": cellval[4].innerText,
|
||||||
|
});
|
||||||
|
Type = cellval[3].innerText;
|
||||||
|
}
|
||||||
|
i = i + 1;
|
||||||
|
}
|
||||||
|
// console.log(JSON.stringify(RequistionList));
|
||||||
|
$('#txtReqNo').val(JSON.stringify(RequistionList));
|
||||||
|
}
|
||||||
|
|
||||||
|
function Validate() {
|
||||||
|
var ReqNo = $('#txtReqNo').val();
|
||||||
|
// console.log(ReqNo);
|
||||||
|
if (ReqNo.length <= 0) {
|
||||||
|
alert('Please select the Requisition Number to Create Purchase Order');
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
$('#ImportPOCheck').modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -63,11 +63,17 @@
|
|||||||
color: #0056b3;
|
color: #0056b3;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="content-wrapper">
|
|
||||||
|
|
||||||
<section class="content">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
|
<div class="content-page">
|
||||||
|
<div class="content">
|
||||||
|
<!-- Start Content-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- start page title -->
|
||||||
|
<div>
|
||||||
<?php
|
<?php
|
||||||
helper('form');
|
helper('form');
|
||||||
$error = session()->getFlashdata('error');
|
$error = session()->getFlashdata('error');
|
||||||
@ -81,50 +87,39 @@
|
|||||||
echo show_alert($type, $success);
|
echo show_alert($type, $success);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-6">
|
||||||
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
|
<div class="page-title-box page-title-box-alt">
|
||||||
?> </div>
|
<h4 class="page-title">Employee Details</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-6 text-right">
|
||||||
<div class="box">
|
|
||||||
<div class="box-header">
|
|
||||||
<CENTER>
|
|
||||||
<h3 class="box-title"> Employee Details</h3>
|
|
||||||
</CENTER>
|
|
||||||
</div>
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<form class="Date-filter-form" id="DateRangeFilter">
|
|
||||||
<input type="hidden" name="table" value="requisition">
|
|
||||||
<label for="fromDate">From:</label>
|
|
||||||
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
|
||||||
|
|
||||||
<label for="toDate">To:</label>
|
|
||||||
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
|
||||||
|
|
||||||
<button type="submit">Search</button>
|
|
||||||
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
|
||||||
<div class="error" id="error"></div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-md-6 text-right">
|
|
||||||
<div class="form-group">
|
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>addemployee">Add New Employee</a>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>addemployee">Add New Employee</a>
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>exportemployee">Export Employee Details <i class="fa fa-download" aira-hidden="true"></i></a>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>exportemployee">Export Employee Details <i class="fa fa-download" aira-hidden="true"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<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>
|
||||||
|
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
||||||
|
<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="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
|
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Created Date</th>
|
<th>Created Date</th>
|
||||||
<th>Emp ID</th>
|
<th >Emp ID</th>
|
||||||
<th>Employee Name</th>
|
<th>Employee Name</th>
|
||||||
<th>Contact Number</th>
|
<th>Contact Number</th>
|
||||||
<th>Designation</th>
|
<th>Designation</th>
|
||||||
@ -155,18 +150,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div> <!-- end card body-->
|
||||||
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> <!-- container -->
|
||||||
</div>
|
</div> <!-- content -->
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<!-- <script type="text/javascript">
|
<!-- <script type="text/javascript">
|
||||||
|
|
||||||
@ -193,23 +188,22 @@
|
|||||||
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
};
|
};
|
||||||
// Initialize the DataTable
|
// Initialize the DataTable
|
||||||
var table = $('#datatable').DataTable({
|
|
||||||
"paging": true,
|
|
||||||
"lengthChange": true,
|
|
||||||
"searching": true,
|
|
||||||
"ordering": true,
|
|
||||||
"columnDefs": [{
|
|
||||||
"targets": 0,
|
|
||||||
"type": "date-eu"
|
|
||||||
}],
|
|
||||||
"aaSorting": [
|
|
||||||
[0, "desc"]
|
|
||||||
],
|
|
||||||
"info": true,
|
|
||||||
"autoWidth": true,
|
|
||||||
"pageLength": 10,
|
|
||||||
"lengthMenu": [10, 25, 50, 100],
|
|
||||||
|
|
||||||
|
var table = $('#datatable').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: [[0, 'desc']], // 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
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Initialize the datepickers
|
// Initialize the datepickers
|
||||||
|
|||||||
@ -58,6 +58,10 @@
|
|||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
||||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Scroll the table left to right -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
/* Select2 Input Hight Set */
|
/* Select2 Input Hight Set */
|
||||||
|
|||||||
@ -1,69 +1,86 @@
|
|||||||
<?php
|
<?php
|
||||||
$sample = array_merge($month,$fresh);
|
$sample = array_merge($month, $fresh);
|
||||||
$show_hide_column_value = true;
|
$show_hide_column_value = true;
|
||||||
//print_r($sample);die();
|
//print_r($sample);die();
|
||||||
foreach($sample as $s)
|
foreach ($sample as $s) {
|
||||||
{
|
if (!empty($s->Key)) {
|
||||||
if(!empty($s->Key))
|
|
||||||
{
|
|
||||||
$show_hide_column_value = false;
|
$show_hide_column_value = false;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$show_hide_column_value = true;
|
$show_hide_column_value = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ex = explode('-',$dropdownvalue);
|
$ex = explode('-', $dropdownvalue);
|
||||||
|
|
||||||
if(strlen($ex[0])== '2')
|
if (strlen($ex[0]) == '2') {
|
||||||
{
|
if ($ex[0] < 10) {
|
||||||
if($ex[0] < 10)
|
$ex1 = substr($ex[0], 1);
|
||||||
{
|
} else {
|
||||||
$ex1 = substr($ex[0],1);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$ex1 = $ex[0];
|
$ex1 = $ex[0];
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$ex1 = $ex[0];
|
$ex1 = $ex[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$drop = $ex1.'-'.$ex[1];
|
$drop = $ex1 . '-' . $ex[1];
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('html').bind('keypress', function(e) {
|
$('html').bind('keypress', function(e) {
|
||||||
//alert('Key Pressed');
|
//alert('Key Pressed');
|
||||||
if (e.keyCode == 13) {
|
if (e.keyCode == 13) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.num {
|
.num {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<center>Employee Monthly Payment Listing</center>
|
<center></center>
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
|
||||||
<input type="hidden" id="paydate" value="<?php echo $drop;?>" />
|
<input type="hidden" id="paydate" value="<?php echo $drop; ?>" />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content-page">
|
||||||
|
<div class="content">
|
||||||
|
<!-- Start Content-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- start page title -->
|
||||||
|
<div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="page-title-box page-title-box-alt">
|
||||||
|
<h4 class="page-title">Employee Monthly Payment Listing</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<!--<center><h3 class="box-title">-->
|
<!--<center><h3 class="box-title">-->
|
||||||
@ -85,74 +102,65 @@ $('html').bind('keypress', function(e) {
|
|||||||
|
|
||||||
//echo $current;
|
//echo $current;
|
||||||
$month = date("m");
|
$month = date("m");
|
||||||
if($month < 10)
|
if ($month < 10) {
|
||||||
{
|
$month = substr($month, 1);
|
||||||
$month = substr($month,1);
|
|
||||||
}
|
}
|
||||||
$currentselection = $month . "-" . $year;
|
$currentselection = $month . "-" . $year;
|
||||||
$options = array();
|
$options = array();
|
||||||
$monthsoptions = array("1" => "Jan", "2" => "Feb","3" => "Mar","4" => "Apr","5" => "May","6" => "June","7"=> "July","8"=> "Aug","9" => "Sep","10"=> "Oct","11" => "Nov","12"=>"Dec");
|
$monthsoptions = array("1" => "Jan", "2" => "Feb", "3" => "Mar", "4" => "Apr", "5" => "May", "6" => "June", "7" => "July", "8" => "Aug", "9" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Dec");
|
||||||
|
|
||||||
$currentmontharray = array(array($month."-".$year => $monthsoptions[$month]."-".$year));
|
$currentmontharray = array(array($month . "-" . $year => $monthsoptions[$month] . "-" . $year));
|
||||||
// For find out Next and previous month and year from current year
|
// For find out Next and previous month and year from current year
|
||||||
$aftersix = array();
|
$aftersix = array();
|
||||||
for ($i = 0; $i <3;$i++){
|
for ($i = 0; $i < 3; $i++) {
|
||||||
|
|
||||||
$month++;
|
$month++;
|
||||||
if($month > 12)
|
if ($month > 12) {
|
||||||
{
|
|
||||||
$month = 1;
|
$month = 1;
|
||||||
$year = $year +1;
|
$year = $year + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aftersix[]=array($month."-".$year => $monthsoptions[$month]."-".$year);
|
$aftersix[] = array($month . "-" . $year => $monthsoptions[$month] . "-" . $year);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$year = date("Y");
|
$year = date("Y");
|
||||||
$month = date("m");
|
$month = date("m");
|
||||||
|
|
||||||
$beforesix = array();
|
$beforesix = array();
|
||||||
for ($i = 3; $i >0;$i--){
|
for ($i = 3; $i > 0; $i--) {
|
||||||
|
|
||||||
$month--;
|
$month--;
|
||||||
if($month < 1 )
|
if ($month < 1) {
|
||||||
{
|
|
||||||
$month = 12;
|
$month = 12;
|
||||||
$year = $year - 1;
|
$year = $year - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$beforesix[]=array($month."-".$year => $monthsoptions[$month]."-".$year);
|
$beforesix[] = array($month . "-" . $year => $monthsoptions[$month] . "-" . $year);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$beforesix = array_reverse($beforesix);
|
$beforesix = array_reverse($beforesix);
|
||||||
|
|
||||||
|
|
||||||
$options = array_merge($options,$beforesix);
|
$options = array_merge($options, $beforesix);
|
||||||
//echo count($options);
|
//echo count($options);
|
||||||
|
|
||||||
$options = array_merge($options,$currentmontharray);
|
$options = array_merge($options, $currentmontharray);
|
||||||
$options = array_merge($options,$aftersix);
|
$options = array_merge($options, $aftersix);
|
||||||
|
|
||||||
$ot = array();
|
$ot = array();
|
||||||
foreach($options as $o)
|
foreach ($options as $o) {
|
||||||
{
|
|
||||||
|
|
||||||
foreach($o as $key => $value)
|
foreach ($o as $key => $value) {
|
||||||
{
|
|
||||||
|
|
||||||
$ot[$key] = $value;
|
$ot[$key] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="row">
|
<div class="row" style="margin-bottom:10px">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<form id="formid">
|
<form id="formid">
|
||||||
<?php echo form_dropdown('monthyear',$ot,set_value('monthyear',$currentselection),'id="monthyear"' ,'class="form-control select2');?>
|
<?php echo form_dropdown('monthyear', $ot, set_value('monthyear', $currentselection), 'id="monthyear"', 'class="form-control select2'); ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -202,25 +210,26 @@ $('html').bind('keypress', function(e) {
|
|||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$index=0;
|
$index = 0;
|
||||||
$testarray=array();
|
$testarray = array();
|
||||||
|
|
||||||
if(!empty($sample))
|
if (!empty($sample)) {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($sample as $i=> $record)
|
foreach ($sample as $i => $record) {
|
||||||
{
|
|
||||||
$index++;
|
$index++;
|
||||||
if(in_array($record->EmpID,$testarray)) { $index--; }else{ array_push($testarray,$record->EmpID);
|
if (in_array($record->EmpID, $testarray)) {
|
||||||
|
$index--;
|
||||||
|
} else {
|
||||||
|
array_push($testarray, $record->EmpID);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="lastvalue">
|
<tr class="lastvalue">
|
||||||
<td style="text-align:right;" style="background-color:blue;">
|
<td style="text-align:right;" style="background-color:blue;">
|
||||||
<?php echo $index; ?></td>
|
<?php echo $index; ?></td>
|
||||||
<td style="max-width:80px"><?php echo $record->EmpID ; ?></td>
|
<td style="max-width:80px"><?php echo $record->EmpID; ?></td>
|
||||||
<td style="max-width:80px"><?php echo $record->FirstName; ?></td>
|
<td style="max-width:80px"><?php echo $record->FirstName; ?></td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php
|
<?php
|
||||||
@ -231,68 +240,104 @@ $('html').bind('keypress', function(e) {
|
|||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px"><?php echo $record->Designation; ?></td>
|
<td style="max-width:80px"><?php echo $record->Designation; ?></td>
|
||||||
<td style="max-width:80px"><?php echo $record->NoofDays; ?></td>
|
<td style="max-width:80px"><?php echo $record->NoofDays; ?></td>
|
||||||
<td id="dayWork<?php echo $index?>"
|
<td id="dayWork<?php echo $index ?>"
|
||||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
<?php if (empty($record->Key)) {
|
||||||
<?php if(!empty($record->Key)){?> title="Payslip Calculated"
|
echo "contenteditable='false';";
|
||||||
|
} ?>
|
||||||
|
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||||
style="text-align:right;color:blue;"
|
style="text-align:right;color:blue;"
|
||||||
<?php } else{?>style="text-align:right;" <?php }?>>
|
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||||
<?php if(!empty($record->Days_worked)){echo $record->Days_worked+$record->sunday_count;}else{echo "0.00";}?>
|
<?php if (!empty($record->Days_worked)) {
|
||||||
|
echo $record->Days_worked + $record->sunday_count;
|
||||||
|
} else {
|
||||||
|
echo "0.00";
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<td id="lopDay<?php echo $index?>"
|
<td id="lopDay<?php echo $index ?>"
|
||||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
<?php if (empty($record->Key)) {
|
||||||
<?php if(!empty($record->Key)){?> title="Payslip Calculated"
|
echo "contenteditable='false';";
|
||||||
|
} ?>
|
||||||
|
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||||
style="text-align:right;color:blue;"
|
style="text-align:right;color:blue;"
|
||||||
<?php } else{?>style="text-align:right;" <?php }?>>
|
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||||
<?php if(!empty($record->LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?>
|
<?php if (!empty($record->LOP_Days)) {
|
||||||
|
echo $record->LOP_Days;
|
||||||
|
} else {
|
||||||
|
echo "0.00";
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<td id="paidLeave<?php echo $index?>"
|
<td id="paidLeave<?php echo $index ?>"
|
||||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
<?php if (empty($record->Key)) {
|
||||||
<?php if(!empty($record->Key)){?> title="Payslip Calculated"
|
echo "contenteditable='false';";
|
||||||
|
} ?>
|
||||||
|
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||||
style="text-align:right;color:blue;"
|
style="text-align:right;color:blue;"
|
||||||
<?php } else{?>style="text-align:right;" <?php }?>>
|
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||||
<?php if(!empty($record->Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?>
|
<?php if (!empty($record->Paid_leave)) {
|
||||||
|
echo number_format($record->Paid_leave, 2, '.', '');
|
||||||
|
} else {
|
||||||
|
echo number_format(0.00, 2, '.', '');
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<td id="otHrsWork<?php echo $index?>"
|
<td id="otHrsWork<?php echo $index ?>"
|
||||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
<?php if (empty($record->Key)) {
|
||||||
<?php if(!empty($record->Key)){?> title="Payslip Calculated"
|
echo "contenteditable='false';";
|
||||||
|
} ?>
|
||||||
|
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||||
style="text-align:right;color:blue;"
|
style="text-align:right;color:blue;"
|
||||||
<?php } else{?>style="text-align:right;" <?php }?>>
|
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||||
<?php if(!empty($record->OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?>
|
<?php if (!empty($record->OT_Hrs_Worked)) {
|
||||||
|
echo $record->OT_Hrs_Worked;
|
||||||
|
} else {
|
||||||
|
echo number_format(0.00, 2, '.', '');
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td style="max-width:80px"><?php echo $record->TotalSalary; ?></td>
|
<td style="max-width:80px"><?php echo $record->TotalSalary; ?></td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $perDaySalary = $record->TotalSalary / $record->NoofDays; echo number_format($perDaySalary, 2); ?>
|
<?php $perDaySalary = $record->TotalSalary / $record->NoofDays;
|
||||||
|
echo number_format($perDaySalary, 2); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $workedSalary = $perDaySalary * ($record->Days_worked+$record->sunday_count); echo number_format($workedSalary, 2); ?>
|
<?php $workedSalary = $perDaySalary * ($record->Days_worked + $record->sunday_count);
|
||||||
|
echo number_format($workedSalary, 2); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $perHrSalary = $perDaySalary / 8; echo number_format($perHrSalary, 2); ?>
|
<?php $perHrSalary = $perDaySalary / 8;
|
||||||
|
echo number_format($perHrSalary, 2); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px"><?php echo number_format($workedSalary, 2); ?></td>
|
<td style="max-width:80px"><?php echo number_format($workedSalary, 2); ?></td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $basicWorked = $workedSalary * 70 / 100; echo number_format($basicWorked, 2); ?>
|
<?php $basicWorked = $workedSalary * 70 / 100;
|
||||||
|
echo number_format($basicWorked, 2); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php $hraWorked = $workedSalary * 30 / 100; echo number_format($hraWorked, 2); ?>
|
<?php $hraWorked = $workedSalary * 30 / 100;
|
||||||
|
echo number_format($hraWorked, 2); ?>
|
||||||
</td>
|
</td>
|
||||||
<td style="max-width:80px">
|
<td style="max-width:80px">
|
||||||
<?php echo number_format($basicWorked+$hraWorked, 2); ?></td>
|
<?php echo number_format($basicWorked + $hraWorked, 2); ?></td>
|
||||||
<td id="esiAmt<?php echo $index?>" style="max-width:80px"> <?php echo $esi[$i]; ?> </td>
|
<td id="esiAmt<?php echo $index ?>" style="max-width:80px"> <?php echo $esi[$i]; ?> </td>
|
||||||
<td id="pfAmt<?php echo $index?>" style="max-width:80px"> <?php echo $pf[$i]; ?> </td>
|
<td id="pfAmt<?php echo $index ?>" style="max-width:80px"> <?php echo $pf[$i]; ?> </td>
|
||||||
<td style="max-width:80px"> <?php echo $over_time[$i]; ?> </td>
|
<td style="max-width:80px"> <?php echo $over_time[$i]; ?> </td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td id="monthDue<?php echo $index?>"
|
<td id="monthDue<?php echo $index ?>"
|
||||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
<?php if (empty($record->Key)) {
|
||||||
<?php if(!empty($record->Key)){?> title="Payslip Calculated"
|
echo "contenteditable='false';";
|
||||||
|
} ?>
|
||||||
|
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||||
style="text-align:right;color:blue;"
|
style="text-align:right;color:blue;"
|
||||||
<?php } else{?>style="text-align:right;" <?php }?>>
|
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||||
<?php if(!empty($record->Monthly_Due)){echo $record->Monthly_Due; $totalmonthloan []=$record->Monthly_Due;}else { echo number_format(0.00,2,'.','');} ?>
|
<?php if (!empty($record->Monthly_Due)) {
|
||||||
|
echo $record->Monthly_Due;
|
||||||
|
$totalmonthloan[] = $record->Monthly_Due;
|
||||||
|
} else {
|
||||||
|
echo number_format(0.00, 2, '.', '');
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -307,35 +352,53 @@ $('html').bind('keypress', function(e) {
|
|||||||
<?php ?>
|
<?php ?>
|
||||||
<!-- else{ echo number_format(0.00,2,'.','');;} -->
|
<!-- else{ echo number_format(0.00,2,'.','');;} -->
|
||||||
|
|
||||||
<td id="otherDet<?php echo $index?>" onkeypress="return isNumber(event);"onkeyup="changeInput(event);"
|
<td id="otherDet<?php echo $index ?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);"
|
||||||
<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?>
|
<?php if (empty($record->Key)) {
|
||||||
<?php if(!empty($record->Key)){?> title="Payslip Calculated"
|
echo "contenteditable='true';";
|
||||||
|
} ?>
|
||||||
|
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||||
style="text-align:right;color:blue;"
|
style="text-align:right;color:blue;"
|
||||||
<?php } else{?>style="text-align:right;" <?php }?>>
|
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||||
|
|
||||||
<?php if(!empty($record->Other_Deductions)){echo $record->Other_Deductions;$totalotherDet [] = $record->Other_Deductions;}else{ echo number_format(0.00,2,'.','');} ?>
|
<?php if (!empty($record->Other_Deductions)) {
|
||||||
|
echo $record->Other_Deductions;
|
||||||
|
$totalotherDet[] = $record->Other_Deductions;
|
||||||
|
} else {
|
||||||
|
echo number_format(0.00, 2, '.', '');
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php $totalotherDet [] = isset($Other_Deductions) ? $Other_Deductions : [];?>
|
<?php $totalotherDet[] = isset($Other_Deductions) ? $Other_Deductions : []; ?>
|
||||||
<td id="Festival<?php echo $index?>" onkeypress="return isNumber(event);"
|
<td id="Festival<?php echo $index ?>" onkeypress="return isNumber(event);"
|
||||||
onkeyup="changeInput(event);"
|
onkeyup="changeInput(event);"
|
||||||
<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?>
|
<?php if (empty($record->Key)) {
|
||||||
<?php if(!empty($record->Key)){?> title="Payslip Calculated"
|
echo "contenteditable='true';";
|
||||||
|
} ?>
|
||||||
|
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||||
style="text-align:right;color:blue;"
|
style="text-align:right;color:blue;"
|
||||||
<?php } else{?>style="text-align:right;" <?php }?>>
|
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||||
<?php if(!empty($record->Festival_Bonus)){echo $record->Festival_Bonus;$totalfestival [] = $record->Festival_Bonus;}else{ echo number_format(0.00,2,'.','');;} ?>
|
<?php if (!empty($record->Festival_Bonus)) {
|
||||||
|
echo $record->Festival_Bonus;
|
||||||
|
$totalfestival[] = $record->Festival_Bonus;
|
||||||
|
} else {
|
||||||
|
echo number_format(0.00, 2, '.', '');;
|
||||||
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php $totalfestival [] = isset($Festival_Bonus) ? $Festival_Bonus : [];?>
|
<?php $totalfestival[] = isset($Festival_Bonus) ? $Festival_Bonus : []; ?>
|
||||||
|
|
||||||
<td id="empsal<?php echo $index?>"
|
<td id="empsal<?php echo $index ?>"
|
||||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
<?php if (empty($record->Key)) {
|
||||||
<?php if(!empty($record->Key)){?> title="Payslip Calculated"
|
echo "contenteditable='false';";
|
||||||
style="text-align:right;color:blue;" <?php }?>>
|
} ?>
|
||||||
<?php if(!empty($record->Estimate)){
|
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||||
echo $record->Estimate; $estTotal [] = $record->Estimate;
|
style="text-align:right;color:blue;" <?php } ?>>
|
||||||
}else {
|
<?php if (!empty($record->Estimate)) {
|
||||||
echo $empSalary[$i]; $estTotal [] = $empSalary[$i];
|
echo $record->Estimate;
|
||||||
|
$estTotal[] = $record->Estimate;
|
||||||
|
} else {
|
||||||
|
echo $empSalary[$i];
|
||||||
|
$estTotal[] = $empSalary[$i];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -347,36 +410,36 @@ $('html').bind('keypress', function(e) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" id="sunday<?php echo $index?>"
|
<input type="hidden" id="sunday<?php echo $index ?>"
|
||||||
value="<?php echo $record->sunday_count?>">
|
value="<?php echo $record->sunday_count ?>">
|
||||||
<input type="hidden" id="is_management_team<?php echo $index?>"
|
<input type="hidden" id="is_management_team<?php echo $index ?>"
|
||||||
value="<?php echo $record->is_management_team?>">
|
value="<?php echo $record->is_management_team ?>">
|
||||||
<input type="hidden" id="esi_applicable<?php echo $index?>"
|
<input type="hidden" id="esi_applicable<?php echo $index ?>"
|
||||||
value="<?php echo $record->esi_applicable?>">
|
value="<?php echo $record->esi_applicable ?>">
|
||||||
<input type="hidden" id="pf_applicable<?php echo $index?>"
|
<input type="hidden" id="pf_applicable<?php echo $index ?>"
|
||||||
value="<?php echo $record->pf_applicable?>">
|
value="<?php echo $record->pf_applicable ?>">
|
||||||
<input type="hidden" id="bPay<?php echo $index?>"
|
<input type="hidden" id="bPay<?php echo $index ?>"
|
||||||
value="<?php echo $record->Basic_Pay?>">
|
value="<?php echo $record->Basic_Pay ?>">
|
||||||
<input type="hidden" id="hraRate<?php echo $index?>"
|
<input type="hidden" id="hraRate<?php echo $index ?>"
|
||||||
value="<?php echo $record->HRA_Rate?>">
|
value="<?php echo $record->HRA_Rate ?>">
|
||||||
<input type="hidden" id="allow<?php echo $index?>"
|
<input type="hidden" id="allow<?php echo $index ?>"
|
||||||
value="<?php echo $record->Allowances?>">
|
value="<?php echo $record->Allowances ?>">
|
||||||
<input type="hidden" id="fAllow<?php echo $index?>"
|
<input type="hidden" id="fAllow<?php echo $index ?>"
|
||||||
value="<?php echo $record->Food_Allowances?>">
|
value="<?php echo $record->Food_Allowances ?>">
|
||||||
<input type="hidden" id="pfRate<?php echo $index?>"
|
<input type="hidden" id="pfRate<?php echo $index ?>"
|
||||||
value="<?php echo $record->PF_Rate?>">
|
value="<?php echo $record->PF_Rate ?>">
|
||||||
<input type="hidden" id="eslRate<?php echo $index?>"
|
<input type="hidden" id="eslRate<?php echo $index ?>"
|
||||||
value="<?php echo $record->ESI_Rate?>">
|
value="<?php echo $record->ESI_Rate ?>">
|
||||||
<input type="hidden" id="hraAmt<?php echo $index?>"
|
<input type="hidden" id="hraAmt<?php echo $index ?>"
|
||||||
value="<?php echo $record->HRA_Amount?>">
|
value="<?php echo $record->HRA_Amount ?>">
|
||||||
|
|
||||||
<input type="hidden" id="loanamt<?php echo $index?>"
|
<input type="hidden" id="loanamt<?php echo $index ?>"
|
||||||
value="<?php echo isset($record->Loan_Amount) ? $record->Loan_Amount : 0?>">
|
value="<?php echo isset($record->Loan_Amount) ? $record->Loan_Amount : 0 ?>">
|
||||||
<input type="hidden" id="paidamt<?php echo $index?>"
|
<input type="hidden" id="paidamt<?php echo $index ?>"
|
||||||
value="<?php echo $record->Paid_Amount?>">
|
value="<?php echo $record->Paid_Amount ?>">
|
||||||
|
|
||||||
<input type="hidden" id="duedate<?php echo $index?>"
|
<input type="hidden" id="duedate<?php echo $index ?>"
|
||||||
value="<?php echo $record->DueDate?>">
|
value="<?php echo $record->DueDate ?>">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -388,7 +451,6 @@ $('html').bind('keypress', function(e) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -403,14 +465,14 @@ $('html').bind('keypress', function(e) {
|
|||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
|
|
||||||
<th id="monthloan">
|
<th id="monthloan">
|
||||||
<?php echo isset($totalmonthloan) ? array_sum($totalmonthloan) : '' ;?>
|
<?php echo isset($totalmonthloan) ? array_sum($totalmonthloan) : ''; ?>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th id="other">
|
<th id="other">
|
||||||
<?php echo isset($totalotherDet) ? array_sum($totalotherDet): '' ;?></th>
|
<?php echo isset($totalotherDet) ? array_sum($totalotherDet) : ''; ?></th>
|
||||||
<th id="fest">
|
<th id="fest">
|
||||||
<?php echo isset($totalfestival) ? array_sum($totalfestival): '' ;?></th>
|
<?php echo isset($totalfestival) ? array_sum($totalfestival) : ''; ?></th>
|
||||||
<th id="estsal"><?php echo isset($estTotal) ? array_sum($estTotal): '' ;?></th>
|
<th id="estsal"><?php echo isset($estTotal) ? array_sum($estTotal) : ''; ?></th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
@ -418,7 +480,7 @@ $('html').bind('keypress', function(e) {
|
|||||||
</div>
|
</div>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3" id="savebutton">
|
<div class="col-md-12 text-right" id="savebutton">
|
||||||
<input type="button" id="submit" value="Save" class="btn btn-success"
|
<input type="button" id="submit" value="Save" class="btn btn-success"
|
||||||
onclick="getAllData();">
|
onclick="getAllData();">
|
||||||
</div>
|
</div>
|
||||||
@ -428,19 +490,29 @@ $('html').bind('keypress', function(e) {
|
|||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
</div> <!-- end card body-->
|
||||||
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div> <!-- container -->
|
||||||
</div>
|
</div> <!-- content -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var estTotal = [];
|
|
||||||
|
|
||||||
var totalotherDet = [];
|
$('#monthyear').attr('class', 'form-control');
|
||||||
var totalmonthloan = [];
|
|
||||||
|
var estTotal = [];
|
||||||
|
|
||||||
|
var totalotherDet = [];
|
||||||
|
var totalmonthloan = [];
|
||||||
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
$('tr.lastvalue').each(function() {
|
$('tr.lastvalue').each(function() {
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
@ -491,23 +563,23 @@ $(function() {
|
|||||||
|
|
||||||
|
|
||||||
// show_hide_column(11,key);
|
// show_hide_column(11,key);
|
||||||
var t = $('#monthlylistings').DataTable({
|
// var t = $('#monthlylistings').DataTable({
|
||||||
"columnDefs": [{
|
// "columnDefs": [{
|
||||||
"searchable": false,
|
// "searchable": false,
|
||||||
"orderable": false,
|
// "orderable": false,
|
||||||
"targets": 0
|
// "targets": 0
|
||||||
}],
|
// }],
|
||||||
"searching": true,
|
// "searching": true,
|
||||||
"lengthChange": true,
|
// "lengthChange": true,
|
||||||
"info": true,
|
// "info": true,
|
||||||
"paging": false,
|
// "paging": false,
|
||||||
"autoWidth": true,
|
// "autoWidth": true,
|
||||||
|
|
||||||
// "scrollX": true,
|
// // "scrollX": true,
|
||||||
"order": [
|
// "order": [
|
||||||
[1, 'asc']
|
// [1, 'asc']
|
||||||
],
|
// ],
|
||||||
});
|
// });
|
||||||
|
|
||||||
t.on('order.dt search.dt', function() {
|
t.on('order.dt search.dt', function() {
|
||||||
t.column(0, {
|
t.column(0, {
|
||||||
@ -523,9 +595,9 @@ $(function() {
|
|||||||
|
|
||||||
savebuttonvalidation();
|
savebuttonvalidation();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function isNumber(evt) {
|
function isNumber(evt) {
|
||||||
|
|
||||||
//alert("hi");
|
//alert("hi");
|
||||||
var iKeyCode = (evt.which) ? evt.which : evt.keyCode
|
var iKeyCode = (evt.which) ? evt.which : evt.keyCode
|
||||||
@ -534,9 +606,9 @@ function isNumber(evt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isCheckKeyCode(event) {
|
function isCheckKeyCode(event) {
|
||||||
|
|
||||||
var iKeyCode = (event.which) ? event.which : event.keyCode
|
var iKeyCode = (event.which) ? event.which : event.keyCode
|
||||||
if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57) && (iKeyCode == 78 && iKeyCode == 65)) {
|
if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57) && (iKeyCode == 78 && iKeyCode == 65)) {
|
||||||
@ -545,11 +617,11 @@ function isCheckKeyCode(event) {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getAllData() {
|
function getAllData() {
|
||||||
|
console.log("enter");
|
||||||
var alldata = $("#monthlylistings").tableToJSON();
|
var alldata = $("#monthlylistings").tableToJSON();
|
||||||
//alert(JSON.stringify(alldata));
|
//alert(JSON.stringify(alldata));
|
||||||
alldata = JSON.stringify(alldata)
|
alldata = JSON.stringify(alldata)
|
||||||
@ -564,6 +636,8 @@ function getAllData() {
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>payslip/saveMonthlyData",
|
url: "<?php echo base_url() ?>payslip/saveMonthlyData",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
$('.content').loader('hide');
|
$('.content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
@ -574,10 +648,10 @@ function getAllData() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$("#monthyear").change(function() {
|
$("#monthyear").change(function() {
|
||||||
|
|
||||||
$s = $('#monthyear').val();
|
$s = $('#monthyear').val();
|
||||||
//echo $dropdownvalue;
|
//echo $dropdownvalue;
|
||||||
@ -591,9 +665,9 @@ $("#monthyear").change(function() {
|
|||||||
$('#formid').submit();
|
$('#formid').submit();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function savebuttonvalidation() {
|
function savebuttonvalidation() {
|
||||||
var curselection = $("#monthyear").val();
|
var curselection = $("#monthyear").val();
|
||||||
var currentdate = new Date();
|
var currentdate = new Date();
|
||||||
var currentmonth = currentdate.getMonth();
|
var currentmonth = currentdate.getMonth();
|
||||||
@ -630,14 +704,14 @@ function savebuttonvalidation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var totalfestival = [];
|
var totalfestival = [];
|
||||||
var totalempSal = [];
|
var totalempSal = [];
|
||||||
var grandtotal = [];
|
var grandtotal = [];
|
||||||
|
|
||||||
function changeInput(event, k) {
|
function changeInput(event, k) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -695,22 +769,22 @@ function changeInput(event, k) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(is_management_team == 1){
|
if (is_management_team == 1) {
|
||||||
var dayWorkPaid = dayWorks + paidLeave + lopDay;
|
var dayWorkPaid = dayWorks + paidLeave + lopDay;
|
||||||
}else{
|
} else {
|
||||||
var dayWorkPaid = dayWorks + paidLeave ;
|
var dayWorkPaid = dayWorks + paidLeave;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("day" + dayWorkPaid);
|
console.log("day" + dayWorkPaid);
|
||||||
var NoofDays = dayWorks + paidLeave + lopDay;
|
var NoofDays = dayWorks + paidLeave + lopDay;
|
||||||
console.log("monthday"+NoofDays);
|
console.log("monthday" + NoofDays);
|
||||||
var Food_Allowances = fAllow * dayWorks;
|
var Food_Allowances = fAllow * dayWorks;
|
||||||
// console.log("workedFA"+Food_Allowances);
|
// console.log("workedFA"+Food_Allowances);
|
||||||
|
|
||||||
var daySalary = bpay / NoofDays;
|
var daySalary = bpay / NoofDays;
|
||||||
console.log("1daysalary "+daySalary);
|
console.log("1daysalary " + daySalary);
|
||||||
var dayHra = hraAmt / NoofDays;
|
var dayHra = hraAmt / NoofDays;
|
||||||
console.log("1dayHRA"+dayHra);
|
console.log("1dayHRA" + dayHra);
|
||||||
var onehoursSalary = (daySalary + dayHra) / 8;
|
var onehoursSalary = (daySalary + dayHra) / 8;
|
||||||
console.log("onehours " + onehoursSalary);
|
console.log("onehours " + onehoursSalary);
|
||||||
|
|
||||||
@ -726,10 +800,10 @@ function changeInput(event, k) {
|
|||||||
|
|
||||||
|
|
||||||
var currentDaySalary = daySalary * dayWorkPaid;
|
var currentDaySalary = daySalary * dayWorkPaid;
|
||||||
console.log("11days salary"+currentDaySalary);
|
console.log("11days salary" + currentDaySalary);
|
||||||
|
|
||||||
var currentDayHra = dayHra * dayWorkPaid;
|
var currentDayHra = dayHra * dayWorkPaid;
|
||||||
console.log("11days hra"+currentDayHra);
|
console.log("11days hra" + currentDayHra);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -761,16 +835,16 @@ function changeInput(event, k) {
|
|||||||
|
|
||||||
|
|
||||||
pfAmount = 0;
|
pfAmount = 0;
|
||||||
if(pf_applicable == 1){
|
if (pf_applicable == 1) {
|
||||||
pfAmount = pfAmt;
|
pfAmount = pfAmt;
|
||||||
}else{
|
} else {
|
||||||
pfAmount = 0;
|
pfAmount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
esiAmount = 0;
|
esiAmount = 0;
|
||||||
if(esi_applicable == 1){
|
if (esi_applicable == 1) {
|
||||||
esiAmount = esiAmt;
|
esiAmount = esiAmt;
|
||||||
}else{
|
} else {
|
||||||
esiAmount = 0;
|
esiAmount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -780,12 +854,12 @@ function changeInput(event, k) {
|
|||||||
|
|
||||||
|
|
||||||
var empSalaryAdd = currentDaySalary + totSalayOT + currentDayHra + Festivals;
|
var empSalaryAdd = currentDaySalary + totSalayOT + currentDayHra + Festivals;
|
||||||
console.log("empSalaryAdd "+empSalaryAdd);
|
console.log("empSalaryAdd " + empSalaryAdd);
|
||||||
var empSalarySub = current_loan_amt + esiAmount + pfAmount + otherDets;
|
var empSalarySub = current_loan_amt + esiAmount + pfAmount + otherDets;
|
||||||
console.log("current_loan_amt "+current_loan_amt);
|
console.log("current_loan_amt " + current_loan_amt);
|
||||||
console.log("esiAmount "+esiAmount);
|
console.log("esiAmount " + esiAmount);
|
||||||
console.log("pfAmount "+pfAmount);
|
console.log("pfAmount " + pfAmount);
|
||||||
console.log("otherDets "+otherDets);
|
console.log("otherDets " + otherDets);
|
||||||
|
|
||||||
|
|
||||||
var empMonthSalary = empSalaryAdd - empSalarySub
|
var empMonthSalary = empSalaryAdd - empSalarySub
|
||||||
@ -821,10 +895,10 @@ console.log("otherDets "+otherDets);
|
|||||||
|
|
||||||
calculategrandtotal();
|
calculategrandtotal();
|
||||||
|
|
||||||
}
|
}
|
||||||
var tempTotal = [];
|
var tempTotal = [];
|
||||||
|
|
||||||
function calculategrandtotal() {
|
function calculategrandtotal() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -890,10 +964,10 @@ function calculategrandtotal() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function show_hide_column(col_no, do_show) {
|
function show_hide_column(col_no, do_show) {
|
||||||
var rows = document.getElementById('monthlylistings').rows;
|
var rows = document.getElementById('monthlylistings').rows;
|
||||||
|
|
||||||
for (var row = 0; row < rows.length; row++) {
|
for (var row = 0; row < rows.length; row++) {
|
||||||
@ -902,5 +976,5 @@ function show_hide_column(col_no, do_show) {
|
|||||||
cols[col_no].style.display = do_show ? '' : 'none';
|
cols[col_no].style.display = do_show ? '' : 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user