diff --git a/app/Controllers/Employeedetails.php b/app/Controllers/Employeedetails.php index 5769a066..67bd7da9 100755 --- a/app/Controllers/Employeedetails.php +++ b/app/Controllers/Employeedetails.php @@ -691,6 +691,9 @@ class Employeedetails extends BaseController $LastName = $this->request->getPost('LastName'); $FatherName = $this->request->getPost('FatherName'); $DateofBirth = $this->request->getPost('DateofBirth'); + + // dd($DateofBirth); + $ContactNumber = $this->request->getPost('ContactNumber'); $EmailId = $this->request->getPost('emailid'); $comEmailId = $this->request->getPost('comemailid'); @@ -704,6 +707,9 @@ class Employeedetails extends BaseController $desigination = $this->request->getPost('desigination'); $departmentCode = $this->request->getPost('departmentname'); $dateofjoining = $this->request->getPost('dateofjoining'); + + // dd($dateofjoining); + //$Previousexperience = $this->request->getPost('Previousexperience'); $pre_experience = $this->request->getPost('Previousexperience'); @@ -728,9 +734,18 @@ class Employeedetails extends BaseController $ValidTill = $this->request->getPost('ValidTill'); $addinfo = $this->request->getPost('addinfo'); $driverlicense = $this->request->getPost('driverlicense'); + + + // dd($driverlicense); + $driverlicense = $driverlicense !== null && is_string($driverlicense) ? strtoupper($driverlicense) : null; $licenseExpiryDate = $this->request->getPost('LicenseExpiryDate'); $VoterID = $this->request->getPost('voterID'); + + + //dd($VoterID); + + $VoterID = $VoterID !== null && is_string($VoterID) ? strtoupper($VoterID) : null; $pfno = $this->request->getPost('pfno'); $pfno = $pfno !== null && is_string($pfno) ? strtoupper($pfno) : null; @@ -752,16 +767,21 @@ class Employeedetails extends BaseController $UpdatedBY = $this->session->get('userId'); //$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 != '') { - $Valid = get_date_format($ValidTill); + $Valid = get_date_time_format($ValidTill); } else { $Valid = null; } if ($licenseExpiryDate != '') { - $License_ExpiryDate = get_date_format($licenseExpiryDate); + $License_ExpiryDate = get_date_time_format($licenseExpiryDate); } else { $License_ExpiryDate = null; } diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php index 2560f3ff..edaec602 100755 --- a/app/Controllers/Payslip.php +++ b/app/Controllers/Payslip.php @@ -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); } diff --git a/app/Views/attendance.php b/app/Views/attendance.php index 62779526..bbd5bdc7 100755 --- a/app/Views/attendance.php +++ b/app/Views/attendance.php @@ -244,12 +244,9 @@ $currentday = date('d');
';
+ // print_r($month);
+ // print_r($fresh);
+ // print_r($sample);
+ // echo '';
+
+ // 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 @@
FirstName; ?>
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;
?>
Designation; ?>
@@ -325,13 +333,32 @@
- Key)) {
echo "contenteditable='false';";
} ?>
Key)) { ?> title="Payslip Calculated"
style="text-align:right;color:blue;"
style="text-align:right;" >
+
+ Monthly_Due)) {
+ echo $record->Monthly_Due;
+ $totalmonthloan[] = $record->Monthly_Due;
+ } else {
+ echo number_format(0.00, 2, '.', '');
+ } ?>
+
+ -->
+
+
+ Key)) {
+ echo "contenteditable='true';";
+ } ?>
+ Key)) { ?> title="Payslip Calculated"
+ style="text-align:right;color:blue;"
+ style="text-align:right;" >
+
Monthly_Due)) {
echo $record->Monthly_Due;
$totalmonthloan[] = $record->Monthly_Due;
@@ -342,16 +369,6 @@
-
-
-
-
-
-
-
-
-
-
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() !== "";