Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
fc22fed3ff
@ -1,6 +1,3 @@
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -13,115 +10,97 @@
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
th{
|
||||
width:auto !important;
|
||||
}
|
||||
.dataTables_filter input {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
/* float: right; */
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #00d976;;
|
||||
border-color: #00d976;;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center>
|
||||
<h3 class="box-title">
|
||||
<p><b>Report - Pending Purchase Order </b><br><br><?php echo $headline ?></p>
|
||||
</h3>
|
||||
</center>
|
||||
|
||||
<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"><b>Report - Pending Purchase Order </b><br><br><?php echo $headline ?></h4>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
<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"); ?>">
|
||||
|
||||
<div class="form-group has-feedback">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<label for="client_name">
|
||||
<?php echo 'Supplier'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="client_name" name="client_name">
|
||||
<option value="">Select Supplier</option>
|
||||
<?php
|
||||
foreach($cust as $item):
|
||||
|
||||
{?>
|
||||
|
||||
foreach ($cust as $item): { ?>
|
||||
<option value="<?php echo $item->SupplierName; ?>"><?php echo $item->SupplierName; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
<?php }
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-4">
|
||||
<label for="client_name">
|
||||
<?php echo 'Material'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="item_name" name="item_name">
|
||||
<option value="">Select Material</option>
|
||||
<?php
|
||||
|
||||
|
||||
foreach($material as $it):
|
||||
|
||||
{?>
|
||||
|
||||
foreach ($material as $it): { ?>
|
||||
<option value="<?php echo $it->MaterialName; ?>"><?php echo $it->MaterialName; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
<?php }
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="col-2">
|
||||
<label for="to_date">
|
||||
<?php echo 'Year'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="financialyear" name="financialyear">
|
||||
<option value="">Select Year</option>
|
||||
<?php
|
||||
|
||||
|
||||
foreach($finyear as $item):
|
||||
|
||||
{?>
|
||||
|
||||
foreach ($finyear as $item): { ?>
|
||||
<option value="<?php echo $item->financial_year; ?>"><?php echo $item->financial_year; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
<?php }
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-2">
|
||||
<label for="to_date">
|
||||
<?php echo 'Month'; ?>
|
||||
</label>
|
||||
@ -143,45 +122,54 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<label for="from_date">
|
||||
<?php echo 'From Date'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input name="from_date" id="max-date" class="form-control datepicker">
|
||||
<span class="input-group-addon">
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
</span>
|
||||
<input type="date" name="from_date" id="max-date" class="form-control datepicker">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="col-4">
|
||||
<label for="to_date">
|
||||
<?php echo 'To Date'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input name="to_date" id="min-date" class="form-control datepicker">
|
||||
<span class="input-group-addon">
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
</span>
|
||||
<input type="date" name="to_date" id="min-date" class="form-control datepicker">
|
||||
</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"
|
||||
value="View Report">
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<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;"> -->
|
||||
<thead style="background-color: #ddd;">
|
||||
<tr>
|
||||
<th style="text-align:center" >PO Date</th>
|
||||
@ -193,7 +181,6 @@
|
||||
<th style="text-align:center">Received Quantity</th>
|
||||
<th style="text-align:center">Pending Quantity</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($ppurchse)) {
|
||||
@ -205,13 +192,16 @@
|
||||
|
||||
|
||||
|
||||
foreach($ppurchse as $rel)
|
||||
{
|
||||
foreach ($ppurchse as $rel) {
|
||||
$cat = $rel->category;
|
||||
?>
|
||||
<tr>
|
||||
<!-- <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;
|
||||
?>&ab=<?php //echo $ab;
|
||||
?>&mid=<?php //echo $rel->mid;
|
||||
?>"><?php //echo $rel->supplier_name;
|
||||
?></a>
|
||||
</span></td>-->
|
||||
<td><span>
|
||||
<?php echo $rel->pdate; ?>
|
||||
@ -262,70 +252,56 @@
|
||||
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
<?php {
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
<?php {
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
<?php {
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
<?php {
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
<?php {
|
||||
echo $mvt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
<?php {
|
||||
echo $yqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
<?php {
|
||||
echo $yvt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
@ -337,19 +313,15 @@
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
|
||||
@ -361,75 +333,100 @@
|
||||
<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>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||
table = $('#cc').DataTable( {
|
||||
"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'
|
||||
// }
|
||||
// $.fn.dataTable.moment('DD-MM-YYYY');
|
||||
// table = $('#cc').DataTable({
|
||||
// "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: [
|
||||
|
||||
'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 ) {
|
||||
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() );
|
||||
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
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -478,8 +475,4 @@ $(document).ready(function() {
|
||||
return date;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,30 +5,20 @@
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
||||
|
||||
<?php
|
||||
// print_r($attendance);
|
||||
// echo "<br>";
|
||||
// echo count($attendance);
|
||||
// echo "<br>";
|
||||
// print_r($emppay);
|
||||
// echo "<br>";
|
||||
// echo count($emppay);
|
||||
//print_r($datefordropdown);
|
||||
//print_r($noofpublicholidays);print_r($publicholidaysarray);
|
||||
$datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
//echo $datefordropdown;
|
||||
$attendance = array_merge($attendance,$emppay);
|
||||
date_default_timezone_set('Asia/Kolkata');
|
||||
$currentday = date('d');
|
||||
// print_r($attendance);
|
||||
// echo "<br>------------------------------<br>";
|
||||
|
||||
?>
|
||||
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
#month{
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.fht-table,
|
||||
.fht-table thead,
|
||||
@ -40,6 +30,11 @@ $currentday = date('d');
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
th{
|
||||
color: white;
|
||||
background-color: #d1d6d17a !important;
|
||||
}
|
||||
|
||||
.fht-table td {
|
||||
text-align: center;
|
||||
}
|
||||
@ -59,7 +54,8 @@ $currentday = date('d');
|
||||
/*white-space:nowrap; Impide los saltos de l<>nea autom<6F>ticos */
|
||||
}
|
||||
|
||||
.fht-table th,.fht-table td {
|
||||
.fht-table th,
|
||||
.fht-table td {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@ -109,11 +105,13 @@ $currentday = date('d');
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.header, .main {
|
||||
.header,
|
||||
.main {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.titulosHeader {
|
||||
border-bottom: 1px solid #e8bb25;
|
||||
height: auto;
|
||||
@ -132,6 +130,7 @@ $currentday = date('d');
|
||||
padding: 2px 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
._Separador {
|
||||
background-color: #fff;
|
||||
height: 12px;
|
||||
@ -139,9 +138,11 @@ $currentday = date('d');
|
||||
border-right: 1px solid #ccc;
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
._Separador div {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.celda_normal {
|
||||
/*background-color: #fff;*/
|
||||
/* <!-- ad9271 into ffffff brown-light to green-light --> */
|
||||
@ -160,9 +161,11 @@ $currentday = date('d');
|
||||
white-space: pre-line;
|
||||
empty-cells: show;
|
||||
}
|
||||
|
||||
._cell_header {
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
._cell_Default {
|
||||
background-color: #FFF;
|
||||
text-align: left;
|
||||
@ -173,153 +176,127 @@ $currentday = date('d');
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.modal
|
||||
{
|
||||
.modal {
|
||||
padding-right: 30% ! important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Employee Monthly Attendance View/Edit</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<div class="col-6">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Employee Monthly Attendance View/Edit</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<!-- Right-aligned buttons or links can be added here -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<?php
|
||||
|
||||
$attributes = array('id' => 'atten');
|
||||
echo form_open('attendance', $attributes);
|
||||
$today = date('M-Y');
|
||||
echo form_open('attendance', $attributes); ?>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<?php $today = date('M-Y');
|
||||
$data = array('type' => 'text','name' => 'month','id' => 'month','value' => $datefordropdown,'class' => 'form-control select2');
|
||||
echo form_input($data);?>
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<input type="submit" value="Change Month" class="btn btn-success"
|
||||
title='click here for load attendance for specified month'>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" value="Change Month" class="btn btn-success" title='click here for load attendance for specified month'>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$testarray=array();
|
||||
$finalarray = array();
|
||||
if(!empty($attendance))
|
||||
{
|
||||
|
||||
foreach($attendance as $record)
|
||||
{
|
||||
|
||||
//$index++;
|
||||
|
||||
if(in_array($record->EmpID,$testarray))
|
||||
{
|
||||
//$index--;
|
||||
|
||||
|
||||
// Skip duplicate employee IDs
|
||||
}
|
||||
else{
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
array_push($testarray,$record->EmpID);
|
||||
array_push($finalarray,$record);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<main class="main">
|
||||
<div class="ContenedorTabla">
|
||||
|
||||
<table id="attendance" class="fht-table">
|
||||
<!-- Add table-responsive for horizontal scroll -->
|
||||
<div class="table-responsive">
|
||||
<table id="attendance" class="fht-table table table-striped">
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<th class="celda_encabezado_general" rowspan="2">S.NO</th>
|
||||
<th class="celda_encabezado_general" rowspan="2">Employee ID</th>
|
||||
<th style="background-color: #00a65a;color:#fff;border:5px" rowspan="2">Employee Name</th>
|
||||
|
||||
<th style="background-color: #00a65a;color:#fff;border:5px" rowspan="2">
|
||||
Employee Name</th>
|
||||
|
||||
<?php
|
||||
|
||||
for ($col =1; $col <= $monthdays;$col++){
|
||||
|
||||
$flag = 0;
|
||||
$flag2 = 0;
|
||||
$todayflag = 0;
|
||||
|
||||
if($col == $currentday)
|
||||
{
|
||||
if($col == $currentday) {
|
||||
$todayflag = 1;
|
||||
|
||||
}
|
||||
foreach($sundayarray as $in) //For Find out Sundays($ind) from $monthdays array
|
||||
{
|
||||
if($in == $col)
|
||||
{
|
||||
foreach($sundayarray as $in) {
|
||||
if($in == $col) {
|
||||
$flag = 1;
|
||||
}
|
||||
}
|
||||
$title = '';
|
||||
foreach($publicholidaysarray as $h) //For Find out public holidays from $monthdays array
|
||||
{
|
||||
|
||||
foreach($publicholidaysarray as $h) {
|
||||
$temp = $h->H_Date;
|
||||
$temp = substr($temp,8);
|
||||
|
||||
if($temp == $col)
|
||||
{
|
||||
if($temp == $col) {
|
||||
$flag2 = 1;
|
||||
//$title ="Public Holiday-" . str_replace(" ","_",$h->H_Name);
|
||||
$title = str_replace(" ","_",$h->H_Name);
|
||||
//echo $title;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<th <?php if($flag2 == 1){ ?>
|
||||
title = " <?php echo $title; ?> "
|
||||
<?php } else if($flag == 1 ){ ?>
|
||||
title = "sunday" <?php }?>
|
||||
<th <?php if($flag2 == 1){ ?> title="<?php echo $title; ?>" <?php } else if($flag == 1 ){ ?> title="sunday" <?php }?>
|
||||
class="celda_encabezado_general"
|
||||
<?php if($flag == 1 or $flag2 == 1)
|
||||
{
|
||||
<?php if($flag == 1 or $flag2 == 1) {
|
||||
echo "style='background: #f39c12 ;'";
|
||||
}
|
||||
else if($todayflag == 1)
|
||||
{ echo "style='background: #dd99ff ;'"; } ?> >
|
||||
<?php if($flag == 1 or $flag2 == 1)
|
||||
{ echo "<font style='color:#fff;'>".$col."W<font>";}
|
||||
else { echo $col."W"; } ?></th>
|
||||
} else if($todayflag == 1) {
|
||||
echo "style='background: #dd99ff ;'"; } ?>>
|
||||
<?php if($flag == 1 or $flag2 == 1) {
|
||||
echo "<font style='color:#fff;'>".$col."W<font>";
|
||||
} else {
|
||||
echo $col."W"; } ?>
|
||||
</th>
|
||||
|
||||
<th <?php if($flag2 == 1){ ?> title="<?php echo $title; ?>" <?php } else if($flag == 1 ){ ?> title="sunday" <?php }?>
|
||||
class="celda_encabezado_general"
|
||||
<?php if($flag == 1 or $flag2 == 1) {
|
||||
echo "style='background: #f39c12 ;'";
|
||||
} else if($todayflag == 1){
|
||||
echo "style='background: #dd99ff ;'"; }?>>
|
||||
<?php if($flag == 1 or $flag2 == 1){
|
||||
echo "<font style='color:#fff;'>".$col."OT<font>";
|
||||
} else {
|
||||
echo $col."OT"; }?>
|
||||
</th>
|
||||
|
||||
|
||||
|
||||
<th <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_encabezado_general" <?php if($flag == 1 or $flag2 == 1) { echo "style='background: #f39c12 ;'"; } else if($todayflag == 1){ echo "style='background: #dd99ff ;'"; }?> > <?php if($flag == 1 or $flag2 == 1){ echo "<font style='color:#fff;'>".$col."OT<font>";} else { echo $col."OT"; }?></th>
|
||||
<?php
|
||||
//echo $flag2;
|
||||
$flag =0;
|
||||
$flag2 =0;
|
||||
$todayflag = 0;
|
||||
@ -330,14 +307,15 @@ $currentday = date('d');
|
||||
<th class="celda_encabezado_general">Days Worked</th>
|
||||
<th class="celda_encabezado_general">Absent</th>
|
||||
<th class="celda_encabezado_general">Total Sunday</th>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody style="background-color: #fff;">
|
||||
<?php $index = 0;
|
||||
$row=0;
|
||||
foreach($finalarray as $a){ $row++;$index++;?>
|
||||
foreach($finalarray as $a){
|
||||
$row++;
|
||||
$index++;
|
||||
?>
|
||||
|
||||
<tr id="<?php echo $row;?>">
|
||||
<td width="45" height="45" class="celda_normal"><?php echo $index;?></td>
|
||||
@ -348,83 +326,102 @@ $currentday = date('d');
|
||||
$flag = 0;
|
||||
$flag2 = 0;
|
||||
|
||||
if($col == $currentday)
|
||||
{
|
||||
if($col == $currentday) {
|
||||
$todayflag = 1;
|
||||
|
||||
}
|
||||
foreach($sundayarray as $in)
|
||||
{
|
||||
if($in == $col)
|
||||
{
|
||||
foreach($sundayarray as $in) {
|
||||
if($in == $col) {
|
||||
$flag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($publicholidaysarray as $h) //For Find out public holidays from $monthdays array
|
||||
{
|
||||
|
||||
foreach($publicholidaysarray as $h) {
|
||||
$temp = $h->H_Date;
|
||||
$temp = substr($temp,8);
|
||||
$title = '';
|
||||
//echo $temp.'-'.$col.'/';
|
||||
if($temp == $col)
|
||||
{
|
||||
if($temp == $col) {
|
||||
$flag2 = 1;
|
||||
//$title ="Public_Holiday-" . str_replace(" ","_",$h->H_Name);
|
||||
$title = str_replace(" ","_",$h->H_Name);
|
||||
//echo $title;
|
||||
}
|
||||
}
|
||||
$WH='WH'.$col;
|
||||
$OT = 'OT'.$col;
|
||||
|
||||
?>
|
||||
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php echo $row.'row'.$col.'W';?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$WH)){echo $a->$WH;} else { echo '0';}?></td>
|
||||
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php echo $row.'row'.$col.'OT';?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$OT)){echo $a->$OT;} else { echo '0';}?></td>
|
||||
|
||||
<?php $flag =0;
|
||||
<td <?php if($flag2 == 1){ ?> title="<?php echo $title; ?>" <?php } else if($flag == 1 ){ ?> title="sunday" <?php }?>
|
||||
class="celda_normal"
|
||||
onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);"
|
||||
id="<?php echo $row.'row'.$col.'W';?>"
|
||||
<?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?>
|
||||
contenteditable="true" tabindex="<?php echo $col;?>">
|
||||
<?php if(!empty($a->$WH)){echo $a->$WH;} else { echo '0';}?>
|
||||
</td>
|
||||
<td <?php if($flag2 == 1){ ?> title="<?php echo $title; ?>" <?php } else if($flag == 1 ){ ?> title="sunday" <?php }?>
|
||||
class="celda_normal"
|
||||
onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);"
|
||||
id="<?php echo $row.'row'.$col.'OT';?>"
|
||||
<?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?>
|
||||
contenteditable="true" tabindex="<?php echo $col;?>">
|
||||
<?php if(!empty($a->$OT)){echo $a->$OT;} else { echo '0';}?>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
$flag =0;
|
||||
$flag2 =0;
|
||||
$todayflag = 0;
|
||||
} ?>
|
||||
<td class="celda_normal" id="<?php echo $row.'TH';?>"><?php if(!empty($a->Total_WHrs)){echo $a->Total_WHrs;}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal" id="<?php echo $row.'OTH';?>"><?php if(!empty($a->Total_OTHrs)){echo $a->Total_OTHrs;}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal" id="<?php echo $row.'PL';?>"><?php if(!empty($a->Paid_Leave)){echo number_format($a->Paid_Leave,2,'.','.');}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal" id="<?php echo $row.'DW';?>"><?php if(!empty($a->Days_Worked)){echo $a->Days_Worked;}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal"id="<?php echo $row.'AB';?>"><?php if(!empty($a->Absent)){echo $a->Absent;}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal"id="<?php echo $row.'TS';?>"><?php if(!empty($noofsundays)){echo $noofsundays;}else{echo "0";}?></td>
|
||||
<td class="celda_normal" id="<?php echo $row.'TH';?>">
|
||||
<?php if(!empty($a->Total_WHrs)){echo $a->Total_WHrs;}else{echo "0.00";}?>
|
||||
</td>
|
||||
<td class="celda_normal" id="<?php echo $row.'OTH';?>">
|
||||
<?php if(!empty($a->Total_OTHrs)){echo $a->Total_OTHrs;}else{echo "0.00";}?>
|
||||
</td>
|
||||
<td class="celda_normal" id="<?php echo $row.'PL';?>">
|
||||
<?php if(!empty($a->Paid_Leave)){echo $a->Paid_Leave;}else{echo "0.00";}?>
|
||||
</td>
|
||||
<td class="celda_normal" id="<?php echo $row.'DW';?>">
|
||||
<?php if(!empty($a->DaysWorked)){echo $a->DaysWorked;}else{echo "0.00";}?>
|
||||
</td>
|
||||
<td class="celda_normal" id="<?php echo $row.'Ab';?>">
|
||||
<?php if(!empty($a->Absent)){echo $a->Absent;}else{echo "0.00";}?>
|
||||
</td>
|
||||
<td class="celda_normal" id="<?php echo $row.'TS';?>">
|
||||
<?php if(!empty($a->TotalSunday)){echo $a->TotalSunday;}else{echo "0.00";}?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
<div class="box-footer ">
|
||||
</div><!-- End table-responsive -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="button" class="btn btn-success" id="c" value="save" onClick="getAllData();">
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.box footer -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div> <!-- End card-body -->
|
||||
</div> <!-- End card -->
|
||||
</div> <!-- End col -->
|
||||
</div> <!-- End row -->
|
||||
</div>
|
||||
</div> <!-- End container-fluid -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#month").datepicker({
|
||||
minViewMode: 1,
|
||||
format: 'M-yyyy'
|
||||
});
|
||||
|
||||
|
||||
function getAllData()
|
||||
{
|
||||
function getAllData() {
|
||||
|
||||
var s = findInvalidData();
|
||||
|
||||
@ -451,14 +448,17 @@ $currentday = date('d');
|
||||
var totaldata = 0;
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:alldata,param2:currentdate,param3:Totalnoofdays},
|
||||
data: {
|
||||
param1: alldata,
|
||||
param2: currentdate,
|
||||
param3: Totalnoofdays
|
||||
},
|
||||
//dataType:"json",
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>monthlypay/saveAttendance",
|
||||
|
||||
success: function(data) {
|
||||
if(data)
|
||||
{
|
||||
if (data) {
|
||||
$('.content').loader('hide');
|
||||
alert(data);
|
||||
//totaldata = totaldata + parseFloat(data);
|
||||
@ -470,16 +470,10 @@ $currentday = date('d');
|
||||
}
|
||||
});
|
||||
//alert(totaldata+"-Employees attendance saved sucessfully..!");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
alert('Plesae Provide Working Hrs and OT Hrs Correctly..!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -487,24 +481,23 @@ $currentday = date('d');
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
$("#attendance").CongelarFilaColumna({lboHoverTr:true});
|
||||
$('html').bind('keypress', function(e)
|
||||
{
|
||||
$("#attendance").CongelarFilaColumna({
|
||||
lboHoverTr: true
|
||||
});
|
||||
$('html').bind('keypress', function(e) {
|
||||
|
||||
|
||||
if(((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 46) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 39))
|
||||
{
|
||||
if (((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) ==
|
||||
46) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 39)) {
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
if(e.keyCode == 13)
|
||||
{
|
||||
if (e.keyCode == 13) {
|
||||
|
||||
return false;
|
||||
}
|
||||
if(((e.which || e.keyCode) < 48) || ((e.which || e.keyCode) > 57))
|
||||
{
|
||||
if (((e.which || e.keyCode) < 48) || ((e.which || e.keyCode) > 57)) {
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -518,9 +511,10 @@ $currentday = date('d');
|
||||
var id = e.target.id;
|
||||
var val = document.getElementById(id).textContent
|
||||
//console.log(val);
|
||||
if(val == 0)
|
||||
{
|
||||
window.setTimeout(function(){ document.getElementById(id).textContent = ''; }, 0);
|
||||
if (val == 0) {
|
||||
window.setTimeout(function() {
|
||||
document.getElementById(id).textContent = '';
|
||||
}, 0);
|
||||
}
|
||||
});
|
||||
|
||||
@ -528,9 +522,10 @@ $currentday = date('d');
|
||||
|
||||
var id = e.target.id;
|
||||
var val = document.getElementById(id).textContent
|
||||
if(val == '')
|
||||
{
|
||||
window.setTimeout(function(){ document.getElementById(id).textContent = '0'; }, 0);
|
||||
if (val == '') {
|
||||
window.setTimeout(function() {
|
||||
document.getElementById(id).textContent = '0';
|
||||
}, 0);
|
||||
}
|
||||
//console.log(val);
|
||||
});
|
||||
@ -545,28 +540,21 @@ $currentday = date('d');
|
||||
var n = monthyear + '' + monthno + '01';
|
||||
|
||||
|
||||
if(d < n)
|
||||
{
|
||||
if (d < n) {
|
||||
$('#c').hide();
|
||||
} else {
|
||||
$('#c').show();
|
||||
}
|
||||
else{ $('#c').show();}
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function myFunction(p, i, v) {
|
||||
|
||||
function myFunction(p,i,v)
|
||||
{
|
||||
//alert(p+"-"+i+"-"+v);
|
||||
//alert(v);
|
||||
// alert(k.keyCode);
|
||||
var v = v;
|
||||
var i = i;
|
||||
var id = i.substr(-1);
|
||||
//alert(id);
|
||||
var len = i.length;
|
||||
var nxtid = 0;
|
||||
var nxtvalue = 0;
|
||||
@ -574,8 +562,7 @@ function myFunction(p,i,v)
|
||||
var curid = 0;
|
||||
|
||||
|
||||
if(v > 24)
|
||||
{
|
||||
if (v > 24) {
|
||||
alert('Working Hrs Do Not Exceed 24 HRs');
|
||||
|
||||
$(i).focus();
|
||||
@ -591,12 +578,6 @@ function myFunction(p,i,v)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//alert(nxtid);
|
||||
//console.log(nextid[0].attributes[2].value);
|
||||
//console.log(nextid);
|
||||
|
||||
nxtvalue = v - 8;
|
||||
curvalue = 8;
|
||||
|
||||
@ -605,21 +586,17 @@ function myFunction(p,i,v)
|
||||
document.getElementById(i).innerHTML = parseFloat(curvalue)
|
||||
if (document.getElementById(nxtid)) {
|
||||
document.getElementById(nxtid).innerHTML = parseFloat(nxtvalue)
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
nxtid = nextid[0].attributes[3].value;
|
||||
document.getElementById(nxtid).innerHTML = parseFloat(nxtvalue)
|
||||
}
|
||||
|
||||
}
|
||||
else if(id == 'T' && v > 16){
|
||||
} else if (id == 'T' && v > 16) {
|
||||
|
||||
alert("OT Should not exceed 16 Hrs");
|
||||
$(i).focus();
|
||||
document.getElementById(i).innerHTML = '';
|
||||
}
|
||||
else if(id == 'S' && v > 16)
|
||||
{
|
||||
} else if (id == 'S' && v > 16) {
|
||||
var j = '#' + i;
|
||||
//console.log(i);
|
||||
//console.log('********************************************');
|
||||
@ -670,10 +647,8 @@ function myFunction(p,i,v)
|
||||
var Row = $('#attendance').find('tr').eq(p).find('td');
|
||||
// console.log(Row);
|
||||
$.each(Row, function(index, value) {
|
||||
cal:
|
||||
{
|
||||
if(index >= totaldays )
|
||||
{
|
||||
cal: {
|
||||
if (index >= totaldays) {
|
||||
break cal;
|
||||
}
|
||||
if ((index != 0) && (index != 1) && (index != 2)) // && (index > totaldays))
|
||||
@ -688,8 +663,7 @@ function myFunction(p,i,v)
|
||||
|
||||
|
||||
|
||||
if(str1 == 'W')
|
||||
{
|
||||
if (str1 == 'W') {
|
||||
sundayValidation = false;
|
||||
let dateInt = +str3.replace(/\D/g, '');
|
||||
sundaysArray.forEach(element => {
|
||||
@ -706,11 +680,11 @@ function myFunction(p,i,v)
|
||||
totalworkingHrs += current;
|
||||
}
|
||||
|
||||
if(current == 0){absent++;}
|
||||
|
||||
if (current == 0) {
|
||||
absent++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
} else {
|
||||
var current = value.textContent == '' ? 0 : parseFloat(value.textContent);
|
||||
totalOTHrs = totalOTHrs + current;
|
||||
|
||||
@ -724,35 +698,17 @@ function myFunction(p,i,v)
|
||||
});
|
||||
|
||||
|
||||
|
||||
// if(paidleave == 1 )
|
||||
// {
|
||||
// absent = 0;
|
||||
// alert('if');
|
||||
// }
|
||||
// if(paidleave == 0)
|
||||
// {
|
||||
// absent = 0;
|
||||
// alert('else if');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // absent = paidleave-0;
|
||||
// // paidleave = 0;
|
||||
// absent = paidleave;
|
||||
// paidleave = 0;
|
||||
// alert('else');
|
||||
// }
|
||||
TotalOT = totalOTHrs + sundayWorkingHr;
|
||||
document.getElementById(totalhrsid).textContent = parseFloat(totalworkingHrs).toFixed(2);// == ''?0:parseFloat(totalworkingHrs));
|
||||
document.getElementById(totalothrsid).textContent = parseFloat(TotalOT).toFixed(2);// == ''?0:parseFloat(totalOTHrs));
|
||||
document.getElementById(totalhrsid).textContent = parseFloat(totalworkingHrs).toFixed(
|
||||
2); // == ''?0:parseFloat(totalworkingHrs));
|
||||
document.getElementById(totalothrsid).textContent = parseFloat(TotalOT).toFixed(
|
||||
2); // == ''?0:parseFloat(totalOTHrs));
|
||||
document.getElementById(paidleaveid).textContent = parseFloat(paidleave).toFixed(2);
|
||||
document.getElementById(daysworkedid).textContent = parseFloat((totalworkingHrs / 8)).toFixed(2);
|
||||
document.getElementById(absentid).textContent = parseFloat(absent).toFixed(2);
|
||||
}
|
||||
|
||||
function findInvalidData()
|
||||
{
|
||||
function findInvalidData() {
|
||||
var flag = 0;
|
||||
|
||||
//totaldays = (totaldays * 2);
|
||||
@ -765,36 +721,47 @@ function findInvalidData()
|
||||
|
||||
$.each(td, function(iter, val) {
|
||||
//console.log(iter+'-'+val.id+'-'+val.textContent);
|
||||
if((val.id).substr(-1) == 'W' && (val.id).substr(-2) != 'DW')
|
||||
{
|
||||
if(parseFloat(val.textContent) > 8)
|
||||
{
|
||||
if ((val.id).substr(-1) == 'W' && (val.id).substr(-2) != 'DW') {
|
||||
if (parseFloat(val.textContent) > 8) {
|
||||
//alert('more than 8');
|
||||
var ide = '#' + (val.id);
|
||||
var p = $(ide).css("background-color", "red");
|
||||
p.hide(1000).show(1000);
|
||||
p.queue(function() {
|
||||
p.css({"background-color":"white"});
|
||||
p.css({
|
||||
"background-color": "white"
|
||||
});
|
||||
$(ide).mouseover(function() {
|
||||
$(this).css({"background-color":" #00a65a;"})
|
||||
}).mouseout(function(){ $(this).css({"background-color":"white"});});
|
||||
$(this).css({
|
||||
"background-color": " #00a65a;"
|
||||
})
|
||||
}).mouseout(function() {
|
||||
$(this).css({
|
||||
"background-color": "white"
|
||||
});
|
||||
});
|
||||
});
|
||||
flag++;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if((val.id).substr(-1) == 'T')
|
||||
{
|
||||
if(parseFloat(val.textContent) > 16)
|
||||
{
|
||||
} else if ((val.id).substr(-1) == 'T') {
|
||||
if (parseFloat(val.textContent) > 16) {
|
||||
var ide = '#' + (val.id);
|
||||
var p = $(ide).css("background-color", "red");
|
||||
p.hide(1000).show(1000);
|
||||
p.queue(function() {
|
||||
p.css({"background-color":"white"});
|
||||
p.css({
|
||||
"background-color": "white"
|
||||
});
|
||||
$(ide).mouseover(function() {
|
||||
$(this).css({"background-color":" #00a65a;"})
|
||||
}).mouseout(function(){ $(this).css({"background-color":"white"});});
|
||||
$(this).css({
|
||||
"background-color": " #00a65a;"
|
||||
})
|
||||
}).mouseout(function() {
|
||||
$(this).css({
|
||||
"background-color": "white"
|
||||
});
|
||||
});
|
||||
});
|
||||
flag++;
|
||||
return false;
|
||||
@ -809,33 +776,24 @@ function findInvalidData()
|
||||
//for Reset WH, OT, PL, AB to zero if all days entries are zero
|
||||
//alert('before for');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return flag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
function resetFinalValues()
|
||||
{
|
||||
function resetFinalValues() {
|
||||
var Row = $('#attendance').find('tr');
|
||||
var totalrowcount = Row.length;
|
||||
totalrowcount = totalrowcount - 1;
|
||||
var totaldays = <?php echo $monthdays?>;
|
||||
console.log(totalrowcount);
|
||||
for(i=1;i<=totalrowcount;i++)
|
||||
{
|
||||
for (i = 1; i <= totalrowcount; i++) {
|
||||
|
||||
//alert('inside for');
|
||||
// var a = parseFloat(document.getElementById(i+'PL').textContent);
|
||||
var b = parseFloat(document.getElementById(i + 'AB').textContent);
|
||||
//alert(a+'-'+b+'-'+totaldays);
|
||||
if(totaldays == (b))
|
||||
{
|
||||
if (totaldays == (b)) {
|
||||
//document.getElementById(i+'PL').textContent = '0.00';
|
||||
document.getElementById(i + 'AB').textContent = '0.00';
|
||||
}
|
||||
@ -845,5 +803,4 @@ function resetFinalValues()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -6,8 +6,10 @@
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.modal-content-custom-width {
|
||||
width: 75%; /* Adjust the width as needed */
|
||||
width: 75%;
|
||||
/* Adjust the width as needed */
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
@ -75,21 +77,27 @@ span.highlight {
|
||||
.Date-filter-form {
|
||||
display: flex;
|
||||
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;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.Date-filter-form button {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.Date-filter-form button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
background: none;
|
||||
border: none;
|
||||
@ -97,6 +105,7 @@ span.highlight {
|
||||
color: #007bff;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.icon-button:hover {
|
||||
color: #0056b3;
|
||||
}
|
||||
@ -106,98 +115,20 @@ span.highlight {
|
||||
<div class="content">
|
||||
<?php $attributes = array('class' => 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form');
|
||||
echo form_open(base_url() . 'purchaseOrder', $attributes); ?>
|
||||
|
||||
<!-- Start Content-->
|
||||
<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-dialog" style="vertical-align: middle;width: fit-content">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:800px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center>
|
||||
<h4> Requisition Details - <label id="SelReqNo" name="SelReqNo"></label> </h4>
|
||||
</center>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
@ -283,6 +214,127 @@ span.highlight {
|
||||
</form>
|
||||
</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">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -291,9 +343,9 @@ span.highlight {
|
||||
<th>Requistion Number</th>
|
||||
<th>Requistion Type </th>
|
||||
<th>Requested By</th>
|
||||
<th>Tot. No. Of Line Items</th>
|
||||
<th>Po Created Line Items</th>
|
||||
<th>Partial PO Created Line Items</th>
|
||||
<th>Tot Line Items</th>
|
||||
<th>Po Line Items</th>
|
||||
<th>Partial PO Line Items</th>
|
||||
<th>New Line Items</th>
|
||||
<th>Status</th>
|
||||
<th>Department</th>
|
||||
@ -331,32 +383,7 @@ span.highlight {
|
||||
?>
|
||||
</tbody>
|
||||
</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 -->
|
||||
</div><!-- end col-->
|
||||
@ -365,103 +392,26 @@ span.highlight {
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||
<script>
|
||||
var POType = '';
|
||||
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));
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#RequisitionDtlsModal").on("shown.bs.modal", function(e) {
|
||||
var ReqId = $(e.relatedTarget).data('userid');
|
||||
$('#SelReqNo').html(ReqId);
|
||||
$('#content').loader('show');
|
||||
// $('#content').loader('show');
|
||||
$.ajax({
|
||||
data: { id: ReqId },
|
||||
data: {
|
||||
id: ReqId
|
||||
},
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
url: "<?php echo base_url() ?>requisitionform/ViewRequest",
|
||||
success: function(json) {
|
||||
$('#content').loader('hide');
|
||||
// $('#content').loader('hide');
|
||||
var getAvalAmt = json.AvilBudAmount;
|
||||
getAvalAmt = getAvalAmt.replace(/\,/g, '');
|
||||
$("#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({
|
||||
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)
|
||||
lengthMenu: [
|
||||
[10, 20, 30, 50, -1],
|
||||
[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: {
|
||||
paginate: {
|
||||
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
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function(settings, data, dataIndex) {
|
||||
@ -589,4 +510,89 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
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>
|
||||
@ -63,11 +63,17 @@
|
||||
color: #0056b3;
|
||||
}
|
||||
</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
|
||||
helper('form');
|
||||
$error = session()->getFlashdata('error');
|
||||
@ -81,45 +87,34 @@
|
||||
echo show_alert($type, $success);
|
||||
}
|
||||
?>
|
||||
|
||||
<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 class="col-6">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Employee Details</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<div class="col-6 text-right">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<thead style="background-color: #ddd;">
|
||||
<tr>
|
||||
@ -155,18 +150,18 @@
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||
<!-- <script type="text/javascript">
|
||||
|
||||
@ -193,23 +188,22 @@
|
||||
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||
};
|
||||
// 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
|
||||
|
||||
@ -58,6 +58,10 @@
|
||||
<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://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>
|
||||
|
||||
/* Select2 Input Hight Set */
|
||||
|
||||
@ -2,14 +2,10 @@
|
||||
$sample = array_merge($month, $fresh);
|
||||
$show_hide_column_value = true;
|
||||
//print_r($sample);die();
|
||||
foreach($sample as $s)
|
||||
{
|
||||
if(!empty($s->Key))
|
||||
{
|
||||
foreach ($sample as $s) {
|
||||
if (!empty($s->Key)) {
|
||||
$show_hide_column_value = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$show_hide_column_value = true;
|
||||
}
|
||||
break;
|
||||
@ -17,17 +13,13 @@
|
||||
|
||||
$ex = explode('-', $dropdownvalue);
|
||||
|
||||
if(strlen($ex[0])== '2')
|
||||
{
|
||||
if($ex[0] < 10)
|
||||
{
|
||||
if (strlen($ex[0]) == '2') {
|
||||
if ($ex[0] < 10) {
|
||||
$ex1 = substr($ex[0], 1);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$ex1 = $ex[0];
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$ex1 = $ex[0];
|
||||
}
|
||||
|
||||
@ -56,7 +48,7 @@ $('html').bind('keypress', function(e) {
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Employee Monthly Payment Listing</center>
|
||||
<center></center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
@ -64,6 +56,31 @@ $('html').bind('keypress', function(e) {
|
||||
<input type="hidden" id="paydate" value="<?php echo $drop; ?>" />
|
||||
<div class="row">
|
||||
<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-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
@ -85,8 +102,7 @@ $('html').bind('keypress', function(e) {
|
||||
|
||||
//echo $current;
|
||||
$month = date("m");
|
||||
if($month < 10)
|
||||
{
|
||||
if ($month < 10) {
|
||||
$month = substr($month, 1);
|
||||
}
|
||||
$currentselection = $month . "-" . $year;
|
||||
@ -99,14 +115,12 @@ $('html').bind('keypress', function(e) {
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
|
||||
$month++;
|
||||
if($month > 12)
|
||||
{
|
||||
if ($month > 12) {
|
||||
$month = 1;
|
||||
$year = $year + 1;
|
||||
}
|
||||
|
||||
$aftersix[] = array($month . "-" . $year => $monthsoptions[$month] . "-" . $year);
|
||||
|
||||
}
|
||||
|
||||
$year = date("Y");
|
||||
@ -116,14 +130,12 @@ $('html').bind('keypress', function(e) {
|
||||
for ($i = 3; $i > 0; $i--) {
|
||||
|
||||
$month--;
|
||||
if($month < 1 )
|
||||
{
|
||||
if ($month < 1) {
|
||||
$month = 12;
|
||||
$year = $year - 1;
|
||||
}
|
||||
|
||||
$beforesix[] = array($month . "-" . $year => $monthsoptions[$month] . "-" . $year);
|
||||
|
||||
}
|
||||
|
||||
$beforesix = array_reverse($beforesix);
|
||||
@ -136,20 +148,16 @@ $('html').bind('keypress', function(e) {
|
||||
$options = array_merge($options, $aftersix);
|
||||
|
||||
$ot = array();
|
||||
foreach($options as $o)
|
||||
{
|
||||
foreach ($options as $o) {
|
||||
|
||||
foreach($o as $key => $value)
|
||||
{
|
||||
foreach ($o as $key => $value) {
|
||||
|
||||
$ot[$key] = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="row" style="margin-bottom:10px">
|
||||
<div class="col-md-3">
|
||||
<form id="formid">
|
||||
<?php echo form_dropdown('monthyear', $ot, set_value('monthyear', $currentselection), 'id="monthyear"', 'class="form-control select2'); ?>
|
||||
@ -205,16 +213,17 @@ $('html').bind('keypress', function(e) {
|
||||
$index = 0;
|
||||
$testarray = array();
|
||||
|
||||
if(!empty($sample))
|
||||
{
|
||||
if (!empty($sample)) {
|
||||
|
||||
|
||||
$index = 0;
|
||||
$i = 0;
|
||||
foreach($sample as $i=> $record)
|
||||
{
|
||||
foreach ($sample as $i => $record) {
|
||||
$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">
|
||||
@ -232,50 +241,79 @@ $('html').bind('keypress', function(e) {
|
||||
<td style="max-width:80px"><?php echo $record->Designation; ?></td>
|
||||
<td style="max-width:80px"><?php echo $record->NoofDays; ?></td>
|
||||
<td id="dayWork<?php echo $index ?>"
|
||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
||||
<?php if (empty($record->Key)) {
|
||||
echo "contenteditable='false';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?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 id="lopDay<?php echo $index ?>"
|
||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
||||
<?php if (empty($record->Key)) {
|
||||
echo "contenteditable='false';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?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 id="paidLeave<?php echo $index ?>"
|
||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
||||
<?php if (empty($record->Key)) {
|
||||
echo "contenteditable='false';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?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 id="otHrsWork<?php echo $index ?>"
|
||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
||||
<?php if (empty($record->Key)) {
|
||||
echo "contenteditable='false';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?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 style="max-width:80px"><?php echo $record->TotalSalary; ?></td>
|
||||
<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 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 style="max-width:80px">
|
||||
<?php $perHrSalary = $perDaySalary / 8; echo number_format($perHrSalary, 2); ?>
|
||||
<?php $perHrSalary = $perDaySalary / 8;
|
||||
echo number_format($perHrSalary, 2); ?>
|
||||
</td>
|
||||
<td style="max-width:80px"><?php echo number_format($workedSalary, 2); ?></td>
|
||||
<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 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 style="max-width:80px">
|
||||
<?php echo number_format($basicWorked + $hraWorked, 2); ?></td>
|
||||
@ -288,11 +326,18 @@ $('html').bind('keypress', function(e) {
|
||||
|
||||
|
||||
<td id="monthDue<?php echo $index ?>"
|
||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
||||
<?php if (empty($record->Key)) {
|
||||
echo "contenteditable='false';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?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>
|
||||
|
||||
|
||||
@ -308,34 +353,52 @@ $('html').bind('keypress', function(e) {
|
||||
<!-- else{ echo number_format(0.00,2,'.','');;} -->
|
||||
|
||||
<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)) {
|
||||
echo "contenteditable='true';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?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>
|
||||
|
||||
<?php $totalotherDet[] = isset($Other_Deductions) ? $Other_Deductions : []; ?>
|
||||
<td id="Festival<?php echo $index ?>" onkeypress="return isNumber(event);"
|
||||
onkeyup="changeInput(event);"
|
||||
<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?>
|
||||
<?php if (empty($record->Key)) {
|
||||
echo "contenteditable='true';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?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>
|
||||
|
||||
<?php $totalfestival[] = isset($Festival_Bonus) ? $Festival_Bonus : []; ?>
|
||||
|
||||
<td id="empsal<?php echo $index ?>"
|
||||
<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?>
|
||||
<?php if (empty($record->Key)) {
|
||||
echo "contenteditable='false';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;" <?php } ?>>
|
||||
<?php if (!empty($record->Estimate)) {
|
||||
echo $record->Estimate; $estTotal [] = $record->Estimate;
|
||||
echo $record->Estimate;
|
||||
$estTotal[] = $record->Estimate;
|
||||
} else {
|
||||
echo $empSalary[$i]; $estTotal [] = $empSalary[$i];
|
||||
echo $empSalary[$i];
|
||||
$estTotal[] = $empSalary[$i];
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@ -388,7 +451,6 @@ $('html').bind('keypress', function(e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -418,7 +480,7 @@ $('html').bind('keypress', function(e) {
|
||||
</div>
|
||||
<p> </p>
|
||||
<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"
|
||||
onclick="getAllData();">
|
||||
</div>
|
||||
@ -428,12 +490,22 @@ $('html').bind('keypress', function(e) {
|
||||
|
||||
</div> -->
|
||||
</div><!-- /.box -->
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div> <!-- container -->
|
||||
</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">
|
||||
|
||||
$('#monthyear').attr('class', 'form-control');
|
||||
|
||||
var estTotal = [];
|
||||
|
||||
var totalotherDet = [];
|
||||
@ -491,23 +563,23 @@ $(function() {
|
||||
|
||||
|
||||
// show_hide_column(11,key);
|
||||
var t = $('#monthlylistings').DataTable({
|
||||
"columnDefs": [{
|
||||
"searchable": false,
|
||||
"orderable": false,
|
||||
"targets": 0
|
||||
}],
|
||||
"searching": true,
|
||||
"lengthChange": true,
|
||||
"info": true,
|
||||
"paging": false,
|
||||
"autoWidth": true,
|
||||
// var t = $('#monthlylistings').DataTable({
|
||||
// "columnDefs": [{
|
||||
// "searchable": false,
|
||||
// "orderable": false,
|
||||
// "targets": 0
|
||||
// }],
|
||||
// "searching": true,
|
||||
// "lengthChange": true,
|
||||
// "info": true,
|
||||
// "paging": false,
|
||||
// "autoWidth": true,
|
||||
|
||||
// "scrollX": true,
|
||||
"order": [
|
||||
[1, 'asc']
|
||||
],
|
||||
});
|
||||
// // "scrollX": true,
|
||||
// "order": [
|
||||
// [1, 'asc']
|
||||
// ],
|
||||
// });
|
||||
|
||||
t.on('order.dt search.dt', function() {
|
||||
t.column(0, {
|
||||
@ -549,7 +621,7 @@ function isCheckKeyCode(event) {
|
||||
|
||||
|
||||
function getAllData() {
|
||||
|
||||
console.log("enter");
|
||||
var alldata = $("#monthlylistings").tableToJSON();
|
||||
//alert(JSON.stringify(alldata));
|
||||
alldata = JSON.stringify(alldata)
|
||||
@ -564,6 +636,8 @@ function getAllData() {
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>payslip/saveMonthlyData",
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
|
||||
if (data) {
|
||||
$('.content').loader('hide');
|
||||
alert(data);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user