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

This commit is contained in:
aadhavan valli 2024-09-19 17:51:15 +05:30
commit 4fd9fa3424
5 changed files with 89 additions and 48 deletions

View File

@ -691,6 +691,9 @@ class Employeedetails extends BaseController
$LastName = $this->request->getPost('LastName'); $LastName = $this->request->getPost('LastName');
$FatherName = $this->request->getPost('FatherName'); $FatherName = $this->request->getPost('FatherName');
$DateofBirth = $this->request->getPost('DateofBirth'); $DateofBirth = $this->request->getPost('DateofBirth');
// dd($DateofBirth);
$ContactNumber = $this->request->getPost('ContactNumber'); $ContactNumber = $this->request->getPost('ContactNumber');
$EmailId = $this->request->getPost('emailid'); $EmailId = $this->request->getPost('emailid');
$comEmailId = $this->request->getPost('comemailid'); $comEmailId = $this->request->getPost('comemailid');
@ -704,6 +707,9 @@ class Employeedetails extends BaseController
$desigination = $this->request->getPost('desigination'); $desigination = $this->request->getPost('desigination');
$departmentCode = $this->request->getPost('departmentname'); $departmentCode = $this->request->getPost('departmentname');
$dateofjoining = $this->request->getPost('dateofjoining'); $dateofjoining = $this->request->getPost('dateofjoining');
// dd($dateofjoining);
//$Previousexperience = $this->request->getPost('Previousexperience'); //$Previousexperience = $this->request->getPost('Previousexperience');
$pre_experience = $this->request->getPost('Previousexperience'); $pre_experience = $this->request->getPost('Previousexperience');
@ -728,9 +734,18 @@ class Employeedetails extends BaseController
$ValidTill = $this->request->getPost('ValidTill'); $ValidTill = $this->request->getPost('ValidTill');
$addinfo = $this->request->getPost('addinfo'); $addinfo = $this->request->getPost('addinfo');
$driverlicense = $this->request->getPost('driverlicense'); $driverlicense = $this->request->getPost('driverlicense');
// dd($driverlicense);
$driverlicense = $driverlicense !== null && is_string($driverlicense) ? strtoupper($driverlicense) : null; $driverlicense = $driverlicense !== null && is_string($driverlicense) ? strtoupper($driverlicense) : null;
$licenseExpiryDate = $this->request->getPost('LicenseExpiryDate'); $licenseExpiryDate = $this->request->getPost('LicenseExpiryDate');
$VoterID = $this->request->getPost('voterID'); $VoterID = $this->request->getPost('voterID');
//dd($VoterID);
$VoterID = $VoterID !== null && is_string($VoterID) ? strtoupper($VoterID) : null; $VoterID = $VoterID !== null && is_string($VoterID) ? strtoupper($VoterID) : null;
$pfno = $this->request->getPost('pfno'); $pfno = $this->request->getPost('pfno');
$pfno = $pfno !== null && is_string($pfno) ? strtoupper($pfno) : null; $pfno = $pfno !== null && is_string($pfno) ? strtoupper($pfno) : null;
@ -752,16 +767,21 @@ class Employeedetails extends BaseController
$UpdatedBY = $this->session->get('userId'); $UpdatedBY = $this->session->get('userId');
//$licenseExpiryDate = get_date_time_format($licenseExpiryDate); //$licenseExpiryDate = get_date_time_format($licenseExpiryDate);
$DOB = get_date_format($DateofBirth);
$DOJ = get_date_format($dateofjoining);
$DOB = get_date_time_format($DateofBirth);
$DOJ = get_date_time_format($dateofjoining);
if ($ValidTill != '') { if ($ValidTill != '') {
$Valid = get_date_format($ValidTill); $Valid = get_date_time_format($ValidTill);
} else { } else {
$Valid = null; $Valid = null;
} }
if ($licenseExpiryDate != '') { if ($licenseExpiryDate != '') {
$License_ExpiryDate = get_date_format($licenseExpiryDate); $License_ExpiryDate = get_date_time_format($licenseExpiryDate);
} else { } else {
$License_ExpiryDate = null; $License_ExpiryDate = null;
} }

View File

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

View File

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

View File

@ -951,7 +951,7 @@ if (!empty($EmpDetails)) {
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<label>Voter ID</label> <label>Voter ID</label>
<input type="text" id="VoterID" name="VoterID" maxlength="12" <input type="text" id="VoterID" name="voterID" maxlength="12"
value="<?php echo $VoterID; ?>" class="form-control" value="<?php echo $VoterID; ?>" class="form-control"
placeholder="VoterID" onkeypress="return alpha(event);" placeholder="VoterID" onkeypress="return alpha(event);"
style="text-transform: uppercase"> style="text-transform: uppercase">
@ -962,7 +962,7 @@ if (!empty($EmpDetails)) {
<input type="text" id="Driverlicense" maxlength="16" <input type="text" id="Driverlicense" maxlength="16"
onchange="validateDriverLicense();" onchange="validateDriverLicense();"
pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}" pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}"
value="<?php echo $DriverLicense; ?>" name="Driverlicense" value="<?php echo $DriverLicense; ?>" name="driverlicense"
title="EX:TN82 12345678900" class="form-control" title="EX:TN82 12345678900" class="form-control"
placeholder="Driverlicense" placeholder="Driverlicense"
style="text-transform: uppercase" style="text-transform: uppercase"
@ -1770,6 +1770,7 @@ if (!empty($EmpDetails)) {
e.preventDefault(); e.preventDefault();
var isValid = true; var isValid = true;
var combinedFormData = new FormData(); var combinedFormData = new FormData();
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here
formIds.forEach(function(formId) { formIds.forEach(function(formId) {
var $form = $(formId); var $form = $(formId);
@ -1781,6 +1782,8 @@ if (!empty($EmpDetails)) {
} }
// Append the form data to FormData // Append the form data to FormData
$form.serializeArray().forEach(function(field) { $form.serializeArray().forEach(function(field) {
console.log(field.name);
console.log(field.value);
combinedFormData.append(field.name, field.value); combinedFormData.append(field.name, field.value);
}); });
// Handle file inputs separately // Handle file inputs separately
@ -1809,7 +1812,7 @@ if (!empty($EmpDetails)) {
console.log('Form submitted successfully:', response == 'true'); console.log('Form submitted successfully:', response == 'true');
if (response == 'true') { if (response == 'true') {
window.location.href = '<?php echo base_url("employeeListing"); ?>'; // window.location.href = '<?php echo base_url("employeeListing"); ?>';
} else { } else {
alert('Employee details Not Update...'); alert('Employee details Not Update...');
} }

View File

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