Merge
This commit is contained in:
commit
39ecdef0d0
@ -1067,25 +1067,25 @@ class Payslip extends BaseController
|
|||||||
$filename = " ";
|
$filename = " ";
|
||||||
$html = "";
|
$html = "";
|
||||||
$All = $this->request->getPost('All');
|
$All = $this->request->getPost('All');
|
||||||
if ($All == '') {
|
// if ($All == '') {
|
||||||
$this->validator->setRules([
|
// $this->validator->setRules([
|
||||||
'Employee' => [
|
// 'Employee' => [
|
||||||
'label' => 'Employee',
|
// 'label' => 'Employee',
|
||||||
'rules' => 'trim|callback_Employee_validate',
|
// 'rules' => 'trim|callback_Employee_validate',
|
||||||
]
|
// ]
|
||||||
]);
|
// ]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$this->validator->setRules([
|
// $this->validator->setRules([
|
||||||
'PayOn' => [
|
// 'PayOn' => [
|
||||||
'label' => 'PayOn',
|
// 'label' => 'PayOn',
|
||||||
'rules' => 'trim|callback_PayOn_validate',
|
// 'rules' => 'trim|callback_PayOn_validate',
|
||||||
]
|
// ]
|
||||||
]);
|
// ]);
|
||||||
|
|
||||||
if ($this->validator->run() == FALSE) {
|
// if ($this->validator->run() == FALSE) {
|
||||||
$this->viewGenerator();
|
// $this->viewGenerator();
|
||||||
} else {
|
// } else {
|
||||||
$Payon = $this->request->getPost('PayOn');
|
$Payon = $this->request->getPost('PayOn');
|
||||||
|
|
||||||
$m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
|
$m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
|
||||||
@ -1193,7 +1193,7 @@ class Payslip extends BaseController
|
|||||||
$mpdf->SetTitle('Resico:Payslip');
|
$mpdf->SetTitle('Resico:Payslip');
|
||||||
|
|
||||||
$mpdf->Output("Payslip-" . $filename . ".pdf", 'D');
|
$mpdf->Output("Payslip-" . $filename . ".pdf", 'D');
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePayslip()
|
function updatePayslip()
|
||||||
|
|||||||
@ -341,7 +341,7 @@ $currentday = date('d');
|
|||||||
<tr id="<?php echo $row;?>">
|
<tr id="<?php echo $row;?>">
|
||||||
<td width="45" height="45" class="celda_normal" ><?php echo $index;?></td>
|
<td width="45" height="45" class="celda_normal" ><?php echo $index;?></td>
|
||||||
<td width="79" height="45" class="celda_normal"><?php echo $a->EmpID;?></td>
|
<td width="79" height="45" class="celda_normal"><?php echo $a->EmpID;?></td>
|
||||||
<td width="80" height="45" class="celda_normal"><?php echo $a->FirstName.'-'.$a->LastName;?></td>
|
<td width="80" height="45" class="celda_normal"><?php echo $a->FirstName;?></td>
|
||||||
|
|
||||||
<?php for ($col =1; $col <= $monthdays;$col++){
|
<?php for ($col =1; $col <= $monthdays;$col++){
|
||||||
$flag =0;
|
$flag =0;
|
||||||
|
|||||||
@ -779,23 +779,20 @@
|
|||||||
<?php if($DEPCode == ADMIN || $DEPCode == HR) { ?>
|
<?php if($DEPCode == ADMIN || $DEPCode == HR) { ?>
|
||||||
<p class="menu-heading"><i class="fa fa-angle-right" aria-hidden="true"></i> HR</p>
|
<p class="menu-heading"><i class="fa fa-angle-right" aria-hidden="true"></i> HR</p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li class="treeview">
|
|
||||||
<a href="#">
|
<li >
|
||||||
<i class="fa fa-user-circle"></i>
|
<a href="<?php echo base_url(); ?>employeeListing" >
|
||||||
<span>Employee</span>
|
|
||||||
<span class="pull-right-container">
|
|
||||||
<i class="fa fa-angle-down pull-right"></i>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<ul class="treeview-menu">
|
|
||||||
<?php if ($DEPCode == ADMIN || $DEPCode == HR) { ?>
|
|
||||||
<li><a href="<?php echo base_url(); ?>employeeListing" >
|
|
||||||
<i class="fa fa-user-circle"></i>
|
<i class="fa fa-user-circle"></i>
|
||||||
<span class="nav-label">Employee Details</span>
|
<span class="nav-label">Employee Details</span>
|
||||||
</a></li>
|
</a>
|
||||||
<?php } ?>
|
|
||||||
</ul>
|
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo base_url(); ?>attendance">
|
||||||
|
<i class="fa fa-clock-o "></i>
|
||||||
|
<span>Attendance</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -878,11 +875,11 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="treeview-menu">
|
<ul class="treeview-menu">
|
||||||
<!-- <li class="treeview">
|
<li class="treeview">
|
||||||
<a href="<?php echo base_url(); ?>Stock">
|
<a href="<?php echo base_url(); ?>Stock">
|
||||||
<i class="fa fa-dashboard"></i> <span>Stock </span>
|
<i class="fa fa-dashboard"></i> <span>Stock </span>
|
||||||
</a>
|
</a>
|
||||||
</li> -->
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo base_url(); ?>FinalProduct">
|
<a href="<?php echo base_url(); ?>FinalProduct">
|
||||||
<i class="fa fa-dashboard"></i> <span>Finished Product Batch Card</span>
|
<i class="fa fa-dashboard"></i> <span>Finished Product Batch Card</span>
|
||||||
|
|||||||
@ -11,75 +11,75 @@
|
|||||||
}
|
}
|
||||||
//echo $ReqNo;
|
//echo $ReqNo;
|
||||||
}?>
|
}?>
|
||||||
<style>
|
<style>
|
||||||
#Requisition_filter{
|
#Requisition_filter {
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
#Requisition_wrapper .row .col-sm-4{
|
|
||||||
flex-basis: 50%;
|
|
||||||
float: inline-end;
|
|
||||||
}
|
|
||||||
#Requisition_paginate .pagination {
|
|
||||||
flex-basis: 50%;
|
|
||||||
float: inline-end;
|
|
||||||
margin:0 0 15px;
|
|
||||||
}
|
|
||||||
#Requisition_wrapper .row:nth-child(3), #Requisition_wrapper .row:nth-child(1){
|
|
||||||
padding: 0 15px;
|
|
||||||
}
|
|
||||||
#Requisition_info{
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
.dataTables_wrapper{
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script>
|
#Requisition_wrapper .row .col-sm-4 {
|
||||||
|
flex-basis: 50%;
|
||||||
|
float: inline-end;
|
||||||
|
}
|
||||||
|
|
||||||
function DeleteRow(rowid)
|
#Requisition_paginate .pagination {
|
||||||
{
|
flex-basis: 50%;
|
||||||
|
float: inline-end;
|
||||||
id = rowid;
|
margin: 0 0 15px;
|
||||||
|
}
|
||||||
var answer = confirm(" Do you want to delete the Requisition?")
|
|
||||||
if (answer)
|
#Requisition_wrapper .row:nth-child(3),
|
||||||
{
|
#Requisition_wrapper .row:nth-child(1) {
|
||||||
|
padding: 0 15px;
|
||||||
$.ajax({
|
}
|
||||||
data:{id:id},
|
|
||||||
type:"POST",
|
#Requisition_info {
|
||||||
url:"<?php echo base_url() ?>requisitionform/DeleteReqNo",
|
margin-top: 5px;
|
||||||
success: function (data) {
|
}
|
||||||
if (data && data.message) {
|
|
||||||
alert(data.message);
|
.dataTables_wrapper {
|
||||||
location.reload(true);
|
padding-bottom: 0;
|
||||||
} else {
|
}
|
||||||
alert("Error Occur");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function (xhr, status, error) {
|
|
||||||
|
|
||||||
alert("Request failed: " + error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
span.highlight {
|
span.highlight {
|
||||||
background-color: yellow;
|
background-color: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px; /* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@ -111,7 +111,6 @@ span.highlight {
|
|||||||
<th>Partially PoCreatedLineItem</th>
|
<th>Partially PoCreatedLineItem</th>
|
||||||
<th>NewLine Item</th>
|
<th>NewLine Item</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Requested By</th>
|
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@ -120,72 +119,153 @@ span.highlight {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(!empty($TotNoOfLine))
|
if(!empty($TotNoOfLine))
|
||||||
{
|
{
|
||||||
foreach($TotNoOfLine as $record)
|
foreach($TotNoOfLine as $record)
|
||||||
{ //print_r($record);
|
{ //print_r($record);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <?php $Pdt = new DateTime($record->CreatedDate );
|
<td> <?php $Pdt = new DateTime($record->CreatedDate );
|
||||||
$PODate = $Pdt->format('d-m-Y');
|
$PODate = $Pdt->format('d-m-Y');
|
||||||
echo $PODate ?>
|
echo $PODate ?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $record->ReqNo ?></td>
|
<td><?php echo $record->ReqNo ?></td>
|
||||||
<td><?php echo $record->ReqType ?></td>
|
<td><?php echo $record->ReqType ?></td>
|
||||||
<td><?php echo $record->TotalNoofLineItems ?></td>
|
<td><?php echo $record->TotalNoofLineItems ?></td>
|
||||||
<td><?php echo $record->PolineItems ?></td>
|
<td><?php echo $record->PolineItems ?></td>
|
||||||
<td><?php echo $record->PartilallyLineItems ?></td>
|
<td><?php echo $record->PartilallyLineItems ?></td>
|
||||||
<td><?php echo $record->newLineItem ?></td>
|
<td> <?php echo $record->newLineItem ?></td>
|
||||||
|
|
||||||
|
|
||||||
<td><?php echo $record->StatusName ?></td>
|
<td><?php echo $record->StatusName ?></td>
|
||||||
<td><?php echo $record->Requestedby ?></td>
|
|
||||||
<td> <a data-toggle="tooltip" href="<?php echo base_url().'EditRequisitionForm?ReqNo='.$record->ReqNo.'&ReqType='.$record->ReqType; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i> </a> <a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )" ><span class="glyphicon glyphicon-trash" title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></span></a> </td>
|
<td> <a data-toggle="tooltip" href="<?php echo base_url().'EditRequisitionForm?ReqNo='.$record->ReqNo.'&ReqType='.$record->ReqType; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i> </a> <a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )" ><span class="glyphicon glyphicon-trash" title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></span></a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
|
||||||
<script>
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
// $('#Requisition').DataTable({
|
|
||||||
// "paging": true,
|
|
||||||
// "lengthChange": true,
|
|
||||||
// "searching": true,
|
|
||||||
// "ordering": true,
|
|
||||||
// "columnDefs": [{"targets": 0, "type": "date-eu"}],
|
|
||||||
// "aaSorting": [[1, "desc"]],
|
|
||||||
// "info": true,
|
|
||||||
// "autoWidth": true,
|
|
||||||
// "pageLength": 10
|
|
||||||
// });
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||||
$('#Requisition').DataTable({
|
<script>
|
||||||
"paging": true, // Enable pagination
|
function DeleteRow(rowid) {
|
||||||
"lengthChange": true, // Enable the option to change the number of rows per page
|
|
||||||
"searching": true, // Enable searching
|
id = rowid;
|
||||||
"ordering": true, // Enable column ordering
|
|
||||||
"columnDefs": [{"targets": 0, "type": "date-eu"}], // Column definitions for date formatting
|
var answer = confirm(" Do you want to delete the Requisition?")
|
||||||
"aaSorting": [[1, "desc"]], // Default sorting: sort by the 2th column (index 1) in descending order
|
if (answer) {
|
||||||
"info": true, // Show pagination info
|
|
||||||
"autoWidth": true, // Enable automatic column width adjustment
|
$.ajax({
|
||||||
"pageLength": 10, // Set the default number of rows per page to 10
|
data: {
|
||||||
"lengthMenu": [10, 25, 50, 100] // Options for the number of rows per page in the dropdown
|
id: id
|
||||||
});
|
},
|
||||||
});
|
type: "POST",
|
||||||
|
url: "<?php echo base_url() ?>requisitionform/DeleteReqNo",
|
||||||
|
success: function(data) {
|
||||||
|
if (data && data.message) {
|
||||||
|
alert(data.message);
|
||||||
|
location.reload(true);
|
||||||
|
} else {
|
||||||
|
alert("Error Occur");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
|
||||||
|
alert("Request failed: " + error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#Requisition').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[1, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user