HR issue : GWM

This commit is contained in:
Smart 2024-09-19 15:19:04 +05:30
parent 15292d82d7
commit e4588fe635
4 changed files with 59 additions and 41 deletions

View File

@ -75,6 +75,7 @@ class Payslip extends BaseController
$loan = [];
$loanHistory = [];
$loan_id = 0;
$BalanceAdvance = 0;
if(is_null($result->Loan_ID)){
}else{
@ -95,6 +96,7 @@ class Payslip extends BaseController
'Due_Date' => $PayOn,
];
$BalanceAdvance = $result->Loan_Amount - ($result->Paid_Amount + $result->Loan_Recovered);
}
@ -121,14 +123,18 @@ class Payslip extends BaseController
'Festival_Bonus' => $result->Festival_Bonus,
'TotalSalary' => $result->Estimate,
'Advance' => $result->Loan_Recovered,
'BalanceAdvance' => 0,
'BalanceAdvance' => $BalanceAdvance,
'LessAdvance' => 0,
'BankAccountNumber' => $result->BankAccountNo,
'PFNumber' => $result->PFNO,
'ESINumber' => $result->ESINO,
'UANNO' => $result->PFNO,
];
// print_r($result);
// print_r($loan);
// print_r($loanHistory);
// print_r($data);
// die;
$insert = $this->payroll_model->insertPayroll($data);
if($insert){
if(count($loan)){
@ -697,7 +703,7 @@ class Payslip extends BaseController
$data['pf'] = $pf;
$data['over_time'] = $ot;
// dd($data);
// dd($data);
$this->global['pageTitle'] = 'Payroll Monthly Inputs';
$this->loadViews("monthlypayinputs", $this->global, $data, NULL);
}

View File

@ -244,12 +244,9 @@ $currentday = date('d');
<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 class="celda_encabezado_general">S.NO</th>
<th class="celda_encabezado_general" >Employee ID</th>
<th style="background-color: #00a65a;color:#fff;border:5px">Employee Name</th>
<?php
for ($col = 1; $col <= $monthdays; $col++) {
@ -332,6 +329,7 @@ $currentday = date('d');
</thead>
<tbody style="background-color: #fff;">
<?php $index = 0;
$row = 0;
foreach ($finalarray as $a) {
@ -504,6 +502,7 @@ $currentday = date('d');
resetFinalValues();
var Totalnoofdays = <?php echo $monthdays ?>;
var alldata = $("#attendance").tableToJSON();
alldata = JSON.stringify(alldata);
@ -544,7 +543,7 @@ $currentday = date('d');
}
});
//alert(totaldata+"-Employees attendance saved sucessfully..!");
} else {
alert('Plesae Provide Working Hrs and OT Hrs Correctly..!');
}
@ -897,7 +896,6 @@ $currentday = date('d');
var totaldays = <?php echo $monthdays ?>;
console.log(totalrowcount);
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);
@ -906,10 +904,7 @@ $currentday = date('d');
//document.getElementById(i+'PL').textContent = '0.00';
document.getElementById(i + 'AB').textContent = '0.00';
}
}
}
</script>

View File

@ -1,15 +1,21 @@
<?php
$sample = array_merge($month, $fresh);
$show_hide_column_value = true;
//print_r($sample);die();
foreach ($sample as $s) {
if (!empty($s->Key)) {
$show_hide_column_value = false;
} else {
$show_hide_column_value = true;
}
break;
}
// $sample = array_merge($month, $fresh);
// $show_hide_column_value = true;
// echo '<pre>';
// print_r($month);
// print_r($fresh);
// print_r($sample);
// echo '<pre>';
// foreach ($sample as $s) {
// if (!empty($s->Key)) {
// $show_hide_column_value = false;
// } else {
// $show_hide_column_value = true;
// }
// break;
// }
$sample = $fresh;
$ex = explode('-', $dropdownvalue);
@ -219,6 +225,7 @@
$index = 0;
$i = 0;
foreach ($sample as $i => $record) {
$index++;
if (in_array($record->EmpID, $testarray)) {
$index--;
@ -233,9 +240,10 @@
<td style="max-width:80px"><?php echo $record->FirstName; ?></td>
<td style="max-width:80px">
<?php
$date = DateTime::createFromFormat('Y-m-d H:i:s', $record->DateofJoining);
$newDateFormat = $date->format('d-m-Y');
echo $newDateFormat;
echo $record->DateofJoining;
// $date = DateTime::createFromFormat('Y-m-d H:i:s', $record->DateofJoining);
// $newDateFormat = $date->format('d-m-Y');
// echo $newDateFormat;
?>
</td>
<td style="max-width:80px"><?php echo $record->Designation; ?></td>
@ -325,13 +333,32 @@
<td id="monthDue<?php echo $index ?>"
<!-- <td id="monthDue<?php echo $index ?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);"
<?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, '.', '');
} ?>
</td> -->
<td id="monthDue<?php echo $index ?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);"
<?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->Monthly_Due)) {
echo $record->Monthly_Due;
$totalmonthloan[] = $record->Monthly_Due;
@ -342,16 +369,6 @@
<?php ?>
<!-- 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';";
@ -589,7 +606,7 @@
alldata = JSON.stringify(alldata)
// Parse the JSON string back into an array of objects
alldata = JSON.parse(alldata);
console.log(alldata);
// Filter out objects where "Emp ID" is empty
alldata = alldata.filter(function(item) {
return item["Emp ID"].trim() !== "";

0
deletableFile.php Normal file → Executable file
View File