From 8550d370ce4d389c32f14b9e6da5f15d1a70cc75 Mon Sep 17 00:00:00 2001 From: Smart Date: Tue, 24 Sep 2024 16:30:58 +0530 Subject: [PATCH] GWM : loan master --- app/Controllers/Payslip.php | 12 +++++-- app/Views/editOldemppay.php | 66 ++++++++++++++-------------------- app/Views/monthlypayinputs.php | 61 ++++++++++++++++--------------- 3 files changed, 67 insertions(+), 72 deletions(-) diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php index edaec602..5de14363 100755 --- a/app/Controllers/Payslip.php +++ b/app/Controllers/Payslip.php @@ -67,7 +67,7 @@ class Payslip extends BaseController $PayOn = $this->request->getPost('payon'); $EmpId = $this->request->getPost('employee'); - + $res = $this->payroll_model->getMonthlyPayDetails($EmpId, $PayOn); $result = $res[0]; @@ -83,10 +83,13 @@ class Payslip extends BaseController { $loan_id = $result->Loan_ID; + if($result->Remaining_Due - 1 == 0){ $is_Active = 0; }else{ $is_Active = 1; } + $loan = [ 'Paid_Due' => $result->Paid_Due + 1, 'Remaining_Due' => $result->Remaining_Due - 1, 'Paid_Amount' => $result->Paid_Amount + $result->Loan_Recovered, + 'is_Active' => $is_Active ]; $loanHistory = [ @@ -130,11 +133,16 @@ class Payslip extends BaseController '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)){ @@ -703,7 +711,7 @@ class Payslip extends BaseController $data['pf'] = $pf; $data['over_time'] = $ot; -// dd($data); + $this->global['pageTitle'] = 'Payroll Monthly Inputs'; $this->loadViews("monthlypayinputs", $this->global, $data, NULL); } diff --git a/app/Views/editOldemppay.php b/app/Views/editOldemppay.php index fef1c8ff..bcfd424e 100755 --- a/app/Views/editOldemppay.php +++ b/app/Views/editOldemppay.php @@ -246,17 +246,30 @@ if (!empty($emppay)) {
Paid Amount - +
+
+
+ Paid Due + +
+
+
+
+ Remaining Due + +
+
+ - - +
- +
@@ -308,27 +321,7 @@ if (!empty($emppay)) {