Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
VE10-Sanjeev 2025-05-12 10:48:26 +00:00
commit 0e9d05fd6a
5 changed files with 102 additions and 40 deletions

View File

@ -1209,7 +1209,7 @@ class StockController extends BaseController
if(!empty($previousMonthCustomMachineCodes)){ if(!empty($previousMonthCustomMachineCodes)){
$existingCustomMachineCodes = $this->factoryMachine_model $existingCustomMachineCodes = $this->factoryMachine_model
->getSelectedDieselMachines(array_column($previousMonthCustomMachineCodes, 'machine_id')); ->getSelectedElectricMachines(array_column($previousMonthCustomMachineCodes, 'machine_id'));
}else{ }else{
// inserting all active if no previous month present // inserting all active if no previous month present
@ -2119,7 +2119,7 @@ class StockController extends BaseController
if(!empty($previousMonthCustomMachineCodes)){ if(!empty($previousMonthCustomMachineCodes)){
$existingCustomMaterialCodes = $this->rawmaterialdetails_model $existingCustomMaterialCodes = $this->rawmaterialdetails_model
->getSelectedResinMaterialCode(array_column($previousMonthCustomMachineCodes, 'materialCode')); ->getSelectedBagMaterialCode(array_column($previousMonthCustomMachineCodes, 'materialCode'));
}else{ }else{
// inserting all active if no previous month present // inserting all active if no previous month present

View File

@ -1,4 +1,6 @@
<?php <?php
use Faker\Core\DateTime;
$datefordropdown = format_date($datefordropdown, 0, 'M-Y'); $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
//echo $datefordropdown; //echo $datefordropdown;
$attendance = array_merge($attendance, $emppay); // initial step there is no attendance entry so emppay data is merged $attendance = array_merge($attendance, $emppay); // initial step there is no attendance entry so emppay data is merged
@ -14,8 +16,6 @@ $currentday = date('d');
text-align: right; text-align: right;
} }
.fht-table, .fht-table,
.fht-table thead, .fht-table thead,
.fht-table tfoot, .fht-table tfoot,
@ -249,8 +249,8 @@ $currentday = date('d');
<?php $today = date('M-Y'); ?> <?php $today = date('M-Y'); ?>
<input type="text" name="month" id="month" value="<?php echo $datefordropdown; ?>" class="form-control" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1"> <input type="text" name="month" id="month" value="<?php echo $datefordropdown; ?>" class="form-control" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1">
</div> </div>
<div class="col-1"> <div class="col-1" style="display: none;">
<input type="submit" value="Change Month" class="btn btn-success" <input type="submit" id="changemonth" value="Change Month" class="btn btn-success"
title='click here for load attendance for specified month' style="margin-top:0px;"> title='click here for load attendance for specified month' style="margin-top:0px;">
</div> </div>
@ -310,6 +310,7 @@ $currentday = date('d');
for ($col = 1; $col <= $monthdays; $col++) { for ($col = 1; $col <= $monthdays; $col++) {
$flag = 0; $flag = 0;
$flag2 = 0; $flag2 = 0;
$todayflag = 0; $todayflag = 0;
@ -338,6 +339,10 @@ $currentday = date('d');
} }
} }
if($col > $currentday && $datefordropdown == date('M-Y')){
continue;
}
?> ?>
@ -414,6 +419,8 @@ $currentday = date('d');
if ($col == $currentday) { if ($col == $currentday) {
$todayflag = 1; $todayflag = 1;
} }
foreach ($sundayarray as $in) { foreach ($sundayarray as $in) {
if ($in == $col) { if ($in == $col) {
$flag = 1; $flag = 1;
@ -434,6 +441,7 @@ $currentday = date('d');
//echo $title; //echo $title;
} }
} }
$WH = 'WH' . $col; $WH = 'WH' . $col;
$OT = 'OT' . $col; $OT = 'OT' . $col;
@ -451,9 +459,16 @@ $currentday = date('d');
} }
if($col > $currentday && $datefordropdown == date('M-Y')){
continue;
}
// echo "<pre>"."empid = $a->EmpID, date = $col, absent = $absent"."</pre>"; // echo "<pre>"."empid = $a->EmpID, date = $col, absent = $absent"."</pre>";
// echo "<pre>"."2) all Flags : flag2 = $flag2, flag = $flag2, absent = $absent"."</pre>"; // echo "<pre>"."2) all Flags : flag2 = $flag2, flag = $flag2, absent = $absent"."</pre>";
?>
?>
<td <?php if ($flag2 == 1) { ?> title=" <?php echo $title; ?> " <td <?php if ($flag2 == 1) { ?> title=" <?php echo $title; ?> "
<?php } else if ($flag == 1) { ?> title="sunday" <?php } ?> <?php } else if ($flag == 1) { ?> title="sunday" <?php } ?>
<?php if ($absent == 1) { ?> title="absent" <?php } ?> <?php if ($absent == 1) { ?> title="absent" <?php } ?>
@ -462,7 +477,7 @@ $currentday = date('d');
id="<?php echo $row . 'row' . $col . 'W'; ?>" id="<?php echo $row . 'row' . $col . 'W'; ?>"
<?php if ($flag == 1 or $flag2 == 1) { <?php if ($flag == 1 or $flag2 == 1) {
echo "style='background: #f5a6a7 ;'"; echo "style='background: #f5a6a7 ;'";
} else if ($todayflag == 1) { } else if ($todayflag == 1 && $datefordropdown == date('M-Y')) {
echo "style='background: #cef0ad ;'"; echo "style='background: #cef0ad ;'";
} ?> } ?>
<?php if ($absent == 1) { <?php if ($absent == 1) {
@ -484,7 +499,7 @@ $currentday = date('d');
id="<?php echo $row . 'row' . $col . 'OT'; ?>" id="<?php echo $row . 'row' . $col . 'OT'; ?>"
<?php if ($flag == 1 or $flag2 == 1) { <?php if ($flag == 1 or $flag2 == 1) {
echo "style='background: #f5a6a7 ;'"; echo "style='background: #f5a6a7 ;'";
} else if ($todayflag == 1) { } else if ($todayflag == 1 && $datefordropdown == date('M-Y')) {
echo "style='background: #cef0ad ;'"; echo "style='background: #cef0ad ;'";
} ?> } ?>
<?php if ($absent == 1) { <?php if ($absent == 1) {
@ -1093,3 +1108,50 @@ $("#searchInput").on("keyup", function () {
}); });
</script> </script>
<!-- on enter key press allowing user to go next line instead of submitting any form here -->
<script>
document.addEventListener("keydown", function(event) {
if (event.key === "Enter") {
let activeElement = document.activeElement;
// Check if the focused element is inside a table
let cell = activeElement.closest("td, th");
let table = activeElement.closest("table");
if (table && cell) {
event.preventDefault(); // Prevent form submission
let columnIndex = cell.cellIndex; // Get the current column index
let currentRow = cell.parentElement; // Get the current row
let nextRow = currentRow.nextElementSibling; // Get the next row
// Move to the same column in the next row if available
if (nextRow) {
let nextCell = nextRow.cells[columnIndex];
if (nextCell) {
nextCell.focus();
}
}
}
}
});
</script>
<script>
$(document).ready(function(){
$('#month').change(function(){
$('#atten').submit();
})
})
</script>

View File

@ -316,7 +316,7 @@
style="text-align:center;color:blue;" style="text-align:center;color:blue;"
<?php } else { ?>style="text-align:center;" <?php } ?>> <?php } else { ?>style="text-align:center;" <?php } ?>>
<?php if (!empty($record->LOP_Days)) { <?php if (!empty($record->LOP_Days)) {
echo $record->LOP_Days; echo round($record->LOP_Days);
} else { } else {
echo "0.00"; echo "0.00";
} ?> } ?>
@ -330,9 +330,9 @@
style="text-align:center;color:blue;" style="text-align:center;color:blue;"
<?php } else { ?>style="text-align:center;" <?php } ?>> <?php } else { ?>style="text-align:center;" <?php } ?>>
<?php if (!empty($record->Paid_leave)) { <?php if (!empty($record->Paid_leave)) {
echo number_format($record->Paid_leave, 2, '.', ''); echo round($record->Paid_leave);
} else { } else {
echo number_format(0.00, 2, '.', ''); echo round(0);
} ?> } ?>
</td> </td>
@ -344,59 +344,59 @@
style="text-align:center;color:blue;" style="text-align:center;color:blue;"
<?php } else { ?>style="text-align:center;" <?php } ?>> <?php } else { ?>style="text-align:center;" <?php } ?>>
<?php if (!empty($record->OT_Hrs_Worked)) { <?php if (!empty($record->OT_Hrs_Worked)) {
echo $record->OT_Hrs_Worked; echo round($record->OT_Hrs_Worked);
} else { } else {
echo number_format(0.00, 2, '.', ''); echo 0;
} ?> } ?>
</td> </td>
<td id="ttlsalary<?php echo $index ?>" style="max-width:80px;text-align:right;"> <td id="ttlsalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php echo $record->TotalSalary; $totalsalary[] = $record->TotalSalary; ?> <?php echo round($record->TotalSalary); $totalsalary[] = $record->TotalSalary; ?>
</td> </td>
<td style="max-width:80px;text-align:right;"> <td style="max-width:80px;text-align:right;">
<?php $perDaySalary = $record->TotalSalary / $record->NoofDays; <?php $perDaySalary = $record->TotalSalary / $record->NoofDays;
echo number_format($perDaySalary, 2, '.', ''); $totalperdaySalary[] = $perDaySalary; ?> echo round($perDaySalary); $totalperdaySalary[] = $perDaySalary; ?>
</td> </td>
<td style="max-width:80px;text-align:right;"> <td style="max-width:80px;text-align:right;">
<?php $workedSalary = $perDaySalary * ($record->Days_worked); <?php $workedSalary = $perDaySalary * ($record->Days_worked);
echo number_format($workedSalary, 2, '.', ''); ?> echo round($workedSalary); ?>
</td> </td>
<td style="max-width:80px;text-align:right;"> <td style="max-width:80px;text-align:right;">
<?php $perHrSalary = $perDaySalary / 8; <?php $perHrSalary = $perDaySalary / 8;
echo number_format($perHrSalary, 2); $totalperhrSalary[] = $perHrSalary; ?> echo round($perHrSalary); $totalperhrSalary[] = $perHrSalary; ?>
</td> </td>
<td style="max-width:80px;text-align:right;"> <td style="max-width:80px;text-align:right;">
<?php echo number_format($workedSalary, 2, '.', ''); $totalworkedSalary[] = $workedSalary; ?> <?php echo round($workedSalary); $totalworkedSalary[] = $workedSalary; ?>
</td> </td>
<td id="bassalary<?php echo $index ?>" style="max-width:80px;text-align:right;"> <td id="bassalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php $basicWorked = $workedSalary * 70 / 100; <?php $basicWorked = $workedSalary * 70 / 100;
echo number_format($basicWorked, 2, '.', ''); $totalbasic[] = $basicWorked; ?> echo round($basicWorked); $totalbasic[] = $basicWorked; ?>
</td> </td>
<td id="hrasalary<?php echo $index ?>" style="max-width:80px;text-align:right;"> <td id="hrasalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php $hraWorked = $workedSalary * 30 / 100; <?php $hraWorked = $workedSalary * 30 / 100;
echo number_format($hraWorked, 2, '.', ''); $totalhra[] = $hraWorked; ?> echo round($hraWorked); $totalhra[] = $hraWorked; ?>
</td> </td>
<td id="grosalary<?php echo $index ?>" style="max-width:80px;text-align:right;"> <td id="grosalary<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php echo number_format($basicWorked + $hraWorked, 2, '.', ''); $totalgross[] = $basicWorked + $hraWorked; ?> <?php echo round($basicWorked + $hraWorked); $totalgross[] = $basicWorked + $hraWorked; ?>
</td> </td>
<td id="esiAmt<?php echo $index ?>" style="max-width:80px;text-align:right;"> <td id="esiAmt<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php echo $esi[$i]; $totalesi[] = $esi[$i]; ?> <?php echo round($esi[$i]); $totalesi[] = $esi[$i]; ?>
</td> </td>
<td id="pfAmt<?php echo $index ?>" style="max-width:80px;text-align:right;"> <td id="pfAmt<?php echo $index ?>" style="max-width:80px;text-align:right;">
<?php echo $pf[$i]; $totalpf[] = $pf[$i]; ?> <?php echo round($pf[$i]); $totalpf[] = $pf[$i]; ?>
</td> </td>
<td style="max-width:80px;text-align:right;"> <td style="max-width:80px;text-align:right;">
<?php echo $over_time[$i]; $totalovertime[] = $over_time[$i]; ?> <?php echo round($over_time[$i]); $totalovertime[] = $over_time[$i]; ?>
</td> </td>
<td id="monthDue<?php echo $index ?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);" <td id="monthDue<?php echo $index ?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);"
@ -406,10 +406,10 @@
<?php } else { ?>style="text-align:right;" <?php } ?>> <?php } else { ?>style="text-align:right;" <?php } ?>>
<?php if (!empty($record->Monthly_Due)) { <?php if (!empty($record->Monthly_Due)) {
echo $record->Monthly_Due; echo round($record->Monthly_Due);
$totalmonthloan[] = $record->Monthly_Due; $totalmonthloan[] = $record->Monthly_Due;
} else { } else {
echo number_format(0.00, 2, '.', ''); echo 0;
} ?> } ?>
</td> </td>
@ -423,10 +423,10 @@
<?php } else { ?>style="text-align:right;" <?php } ?>> <?php } else { ?>style="text-align:right;" <?php } ?>>
<?php if (!empty($record->Other_Deductions)) { <?php if (!empty($record->Other_Deductions)) {
echo $record->Other_Deductions; echo round($record->Other_Deductions);
$totalotherDet[] = $record->Other_Deductions; $totalotherDet[] = $record->Other_Deductions;
} else { } else {
echo number_format(0.00, 2, '.', ''); echo 0 ;
} ?> } ?>
</td> </td>
@ -441,10 +441,10 @@
style="text-align:right;color:blue;" style="text-align:right;color:blue;"
<?php } else { ?>style="text-align:right;" <?php } ?>> <?php } else { ?>style="text-align:right;" <?php } ?>>
<?php if (!empty($record->Festival_Bonus)) { <?php if (!empty($record->Festival_Bonus)) {
echo $record->Festival_Bonus; echo round($record->Festival_Bonus);
$totalfestival[] = $record->Festival_Bonus; $totalfestival[] = $record->Festival_Bonus;
} else { } else {
echo number_format(0.00, 2, '.', '');; echo 0;
} ?> } ?>
</td> </td>
@ -458,15 +458,15 @@
style="text-align:right;color:blue;" <?php }else{ ?>style="text-align:right;" <?php } ?>> style="text-align:right;color:blue;" <?php }else{ ?>style="text-align:right;" <?php } ?>>
<!-- <?php if (!empty($record->Estimate)) { <!-- <?php if (!empty($record->Estimate)) {
echo $record->Estimate; echo round($record->Estimate);
$estTotal[] = $record->Estimate; $estTotal[] = $record->Estimate;
} else { } else {
echo $empSalary[$i]; echo round($empSalary[$i]);
$estTotal[] = $empSalary[$i]; $estTotal[] = $empSalary[$i];
} }
?> --> ?> -->
<?php echo $empSalary[$i]; $estTotal[] = $empSalary[$i]; ?> <?php echo round($empSalary[$i]); $estTotal[] = $empSalary[$i]; ?>
</td> </td>

View File

@ -29,13 +29,13 @@
<a href="<?php echo base_url(); ?>Report_purchase" target="_blank"><p class="uk-text uk-margin-remove">Purchase</p></a> <a href="<?php echo base_url(); ?>Report_purchase" target="_blank"><p class="uk-text uk-margin-remove">Purchase</p></a>
<a href="<?php echo base_url(); ?>Report_year_wise" target="_blank"><p class="uk-text uk-margin-remove">Year Wise</p></a> <a href="<?php echo base_url(); ?>Report_year_wise" target="_blank"><p class="uk-text uk-margin-remove">Year Wise</p></a>
<a href="<?php echo base_url(); ?>Report_pending_purchase" target="_blank"><p class="uk-text uk-margin-remove">Pending Purchase</p></a> <a href="<?php echo base_url(); ?>Report_pending_purchase" target="_blank"><p class="uk-text uk-margin-remove">Pending Purchase</p></a>
<a href="<?php echo base_url(); ?>Report_supplier" target="_blank"><p class="uk-text uk-margin-remove">purchase - Supplier Wise</p></a> <a href="<?php echo base_url(); ?>Report_supplier" target="_blank"><p class="uk-text uk-margin-remove">Purchase - Supplier Wise</p></a>
<a href="<?php echo base_url(); ?>Report_consolidate" target="_blank"><p class="uk-text uk-margin-remove">purchase - Consolidate</p></a> <a href="<?php echo base_url(); ?>Report_consolidate" target="_blank"><p class="uk-text uk-margin-remove">Purchase - Consolidate</p></a>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<h4><span class="fa fa-layer-group">&nbsp; Material Master </span></h4> <h4><span class="fa fa-layer-group">&nbsp; Material Master </span></h4>
<a href="<?php echo base_url(); ?>Report_Material_Supplier" target="_blank"><p class="uk-text uk-margin-remove">Material Master - supplier wise</p></a> <a href="<?php echo base_url(); ?>Report_Material_Supplier" target="_blank"><p class="uk-text uk-margin-remove">Material Master - Supplier Wise</p></a>
<a href="<?php echo base_url(); ?>Report_Material_Item" target="_blank"><p class="uk-text uk-margin-remove">Material Master - Item wise</p></a> <a href="<?php echo base_url(); ?>Report_Material_Item" target="_blank"><p class="uk-text uk-margin-remove">Material Master - Item Wise</p></a>
<a href="<?php echo base_url(); ?>Report_Material_ReceiptValue" target="_blank"><p class="uk-text uk-margin-remove">Material Master - Receipt Value</p></a> <a href="<?php echo base_url(); ?>Report_Material_ReceiptValue" target="_blank"><p class="uk-text uk-margin-remove">Material Master - Receipt Value</p></a>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">

View File

@ -523,7 +523,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
<!-- input sand qty --> <!-- input sand qty -->
<div class="col-md-3"> <div class="col-md-3">
<label class="form" for="additionalEntryInputSandQtyId">Input Sand Quantity (Metric Ton)</label> <label class="form" for="additionalEntryInputSandQtyId">Input Sand Qty(Metric Ton)</label>
<span class="text-danger">*</span> <span class="text-danger">*</span>
<input onchange="additionalEntryGasPerTon(); additionalEntryMoistureLossQty(); additionalEntryQtyPerHrs(); " <input onchange="additionalEntryGasPerTon(); additionalEntryMoistureLossQty(); additionalEntryQtyPerHrs(); "
type="text" class="form-control" id="additionalEntryInputSandQtyId" name="input_sand_qty" value="" required> type="text" class="form-control" id="additionalEntryInputSandQtyId" name="input_sand_qty" value="" required>
@ -691,7 +691,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
<!-- input sand qty --> <!-- input sand qty -->
<div class="col-md-3"> <div class="col-md-3">
<label class="form" for="editEntryInputSandQtyId">Input Sand Quantity (Metric Ton)</label> <label class="form" for="editEntryInputSandQtyId">Input Sand Qty(Metric Ton)</label>
<span class="text-danger">*</span> <span class="text-danger">*</span>
<input onchange="editEntryGasPerTon(); editEntryMoistureLossQty(); editEntryQtyPerHrs(); " <input onchange="editEntryGasPerTon(); editEntryMoistureLossQty(); editEntryQtyPerHrs(); "
type="text" class="form-control" id="editEntryInputSandQtyId" name="input_sand_qty" value="" required> type="text" class="form-control" id="editEntryInputSandQtyId" name="input_sand_qty" value="" required>