From 40b45c480758e1185b9c23c15ced402639034226 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Wed, 26 Mar 2025 12:55:26 +0530 Subject: [PATCH 1/4] GWM : Monthly pay info --- app/Views/monthlypayinputs.php | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/app/Views/monthlypayinputs.php b/app/Views/monthlypayinputs.php index b97620a9..16575911 100755 --- a/app/Views/monthlypayinputs.php +++ b/app/Views/monthlypayinputs.php @@ -212,20 +212,18 @@ - -
- -
-
- -
-
- +
+ + - + + + + + + +
@@ -1389,6 +1387,14 @@ function showMessage(msg) { }, 3000); } +$("#searchInput").on("keyup", function () { + let value = $(this).val().toLowerCase(); // Convert input to lowercase for case-insensitive search + + $("#table-responsive tbody tr").filter(function () { + $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1); + }); +}); + From e57b2c8d44df8d42893a0ae6440728b032be3785 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Wed, 26 Mar 2025 14:04:02 +0530 Subject: [PATCH 2/4] stock module - 26-03-2025 --- app/Views/stock/CoatingMachineDetail.php | 14 +- app/Views/stock/bagStockDetails.php | 22 +-- app/Views/stock/dieselStockDetails.php | 21 ++- app/Views/stock/drierMachineDetails.php | 13 +- app/Views/stock/dustAndRoughStockDetails.php | 131 +++++++++++++++++- app/Views/stock/gasStockDetails.php | 11 +- app/Views/stock/powerConsumptionDetails.php | 24 ++-- app/Views/stock/resinStockDetails.php | 29 ++-- app/Views/stock/trpSandUseStockDetails.php | 134 ++++++++++++++++++- 9 files changed, 334 insertions(+), 65 deletions(-) diff --git a/app/Views/stock/CoatingMachineDetail.php b/app/Views/stock/CoatingMachineDetail.php index a7eac7d7..ae119fc1 100644 --- a/app/Views/stock/CoatingMachineDetail.php +++ b/app/Views/stock/CoatingMachineDetail.php @@ -327,16 +327,16 @@ -
- - +
-
+
+ + + Date Filter +
-
+
-
+ @@ -499,10 +503,133 @@
+ + + + + + + + + + + + + + + + From d74b222aa020234b87ef49e6b428f3270efa5e87 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Wed, 26 Mar 2025 15:37:59 +0530 Subject: [PATCH 3/4] Emp and load detail export : GWM --- app/Config/Routes.php | 2 + app/Controllers/Employeedetails.php | 29 +++++++++++ app/Controllers/Emppaydate.php | 25 +++++++-- app/Views/employeeListing.php | 13 ++--- app/Views/employee_pdf_view.php | 80 +++++++++++++++++++++++++++++ app/Views/emppayListing.php | 2 + app/Views/loan_pdf.php | 49 ++++++++++++++++++ 7 files changed, 191 insertions(+), 9 deletions(-) create mode 100644 app/Views/employee_pdf_view.php create mode 100644 app/Views/loan_pdf.php diff --git a/app/Config/Routes.php b/app/Config/Routes.php index f2f7e9fa..80c93458 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -121,6 +121,7 @@ $routes->post('addNewEmployee', 'Employeedetails::AddNewEmployee'); $routes->post('deleteEmployeeFile', 'Employeedetails::deleteEmployeeFile'); $routes->get('employeeListing', 'Employeedetails::index'); $routes->get('employeedetails/ViewEmployee', 'Employeedetails::ViewEmployee'); +$routes->get('employeedetails/downloadEmployeeDetails', 'Employeedetails::downloadEmployeeDetails'); $routes->post('employeedetails/UpdateEmployee', 'Employeedetails::UpdateEmployee'); $routes->get('exportemployee', 'Employeedetails::exportemployee'); @@ -199,6 +200,7 @@ $routes->post('monthlypay/deletePublicHoliday', 'Monthlypay::deletePublicHoliday $routes->get('emppaydate/addemppaydate', 'Emppaydate::addemppaydate'); $routes->post('emppaydate/addNewemppay', 'Emppaydate::addNewemppay'); $routes->get('emppaydate/editOldemppay/(:num)', 'Emppaydate::editOldemppay/$1'); +$routes->get('emppaydate/downloadEmpLoanData/(:num)', 'Emppaydate::downloadEmpLoanData/$1'); $routes->post('emppaydate/editemppay', 'Emppaydate::editemppay'); $routes->post('emppaydate/deleteEmpPay', 'Emppaydate::deleteEmpPay'); diff --git a/app/Controllers/Employeedetails.php b/app/Controllers/Employeedetails.php index 7f0aa25a..a9a11c83 100755 --- a/app/Controllers/Employeedetails.php +++ b/app/Controllers/Employeedetails.php @@ -14,6 +14,8 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; +use Mpdf\Mpdf; + use PhpOffice\PhpSpreadsheet\Style\Alignment; use App\Models\EmpFilesModel; use App\Models\AppConfigModel; @@ -637,6 +639,33 @@ class Employeedetails extends BaseController $this->loadViews("editEmployeenew", $this->global, $data, NULL); } + + + function downloadEmployeeDetails($EmpNO = '') + { + $EmpID = $_GET['EmpID']; + + $data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID); + $data['emp_data'] = $this->empFiles->where('emp_id', $EmpID)->where('is_active', 1)->findAll(); + $data['empPay'] = $this->emppaydate_model->getEmpPayData($EmpID); + // dd($data); + + + // Load the HTML view and pass data + $html = view('employee_pdf_view', $data); + + + $mpdf = new Mpdf(); + $mpdf->WriteHTML($html); + + // Output the PDF + $fName = $data['EmpDetails'][0]->EmpID.'-Employee-Details.pdf'; + return $mpdf->Output($fName, "D"); + + + } + + /* To Check the email exists in the database or not for the employee*/ function checkMailEmp() { diff --git a/app/Controllers/Emppaydate.php b/app/Controllers/Emppaydate.php index fa8bc2cb..067cb80c 100755 --- a/app/Controllers/Emppaydate.php +++ b/app/Controllers/Emppaydate.php @@ -10,7 +10,7 @@ use App\Models\Emppaydate_model; use App\Models\Payroll_model; - +use Mpdf\Mpdf; /** * Module : Payslip * Emppaydate Class to control all Employee paydate related operations. @@ -142,13 +142,32 @@ class Emppaydate extends BaseController $data['loan_histoty'] = $this->emppaydate_model->getUserLoanHistoryInfo($data['emppay'][0]->Loan_ID); - // print_r($data['loan_histoty']);die; - $this->global['pageTitle'] = 'Edit Employee Pay Monthly Details '; $this->loadViews("editOldemppay", $this->global, $data, NULL); } + function downloadEmpLoanData($paydataid = "") + { + + $data['emppay'] = $this->emppaydate_model->getUserInfo($paydataid); + + $data['loan_histoty'] = $this->emppaydate_model->getUserLoanHistoryInfo($data['emppay'][0]->Loan_ID); + + + // Load HTML view + $html = view('loan_pdf', $data); + + $mpdf = new Mpdf(); + $mpdf->SetTitle("Employee Loan Report"); + $mpdf->WriteHTML($html); + + // Download the PDF + $fName = $data['emppay'][0]->PAYEMPID."-loan-details.pdf"; + return $mpdf->Output($fName, "D"); + + } + /** diff --git a/app/Views/employeeListing.php b/app/Views/employeeListing.php index 3aab43fd..12ca5569 100755 --- a/app/Views/employeeListing.php +++ b/app/Views/employeeListing.php @@ -135,13 +135,14 @@ } else { $cdate = date('d-m-Y', strtotime($record->Created_date)); } ?> - EmpID ?> - is_driver){ ?> -     - -     + + EmpID ?> + +     + + - + FirstName; ?> diff --git a/app/Views/employee_pdf_view.php b/app/Views/employee_pdf_view.php new file mode 100644 index 00000000..f2363bee --- /dev/null +++ b/app/Views/employee_pdf_view.php @@ -0,0 +1,80 @@ + + + + + + Employee Details + + + + +
+
Employee Details
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Employee ID EmpID ?? '-' ?>Name FirstName . ' ' . ($EmpDetails[0]->LastName ?? '') ?>
Gender Gender ?? '-' ?>Date of Birth DateofBirth ?? '')) ?>
Contact Number ContactNumber ?? '-' ?>Email EmailId ?? '-' ?>
Department DepartmentName ?? '-' ?>Designation Designation ?? '-' ?>
Date of Joining DateofJoining ?? '')) ?>Marital Status MartialStatus ?? '-' ?>
Blood Group BloodGroup ?? '-' ?>Father's Name FatherName ?? '-' ?>
Aadhar No AadharNo ?? '-' ?>PAN No PANNo ?? '-' ?>
Present Address PresentAddress ?? '-' ?>
Permanent Address PermanentAddress ?? '-' ?>
+ + +
Salary Details
+ + + + + + + + + + + + + +
Basic Pay Basic_Pay ?? 0, 2) ?>HRA Amount HRA_Amount ?? 0, 2) ?>
HRA Rate HRA_Rate ?? 0, 2) ?>%PF Rate PF_Rate ?? 0, 2) ?>%
ESI Rate ESI_Rate ?? 0, 2) ?>%Total Salary TotalSalary ?? 0, 2) ?>
+ +
+ + + diff --git a/app/Views/emppayListing.php b/app/Views/emppayListing.php index 276e1a45..fadad718 100755 --- a/app/Views/emppayListing.php +++ b/app/Views/emppayListing.php @@ -55,6 +55,8 @@ Remaining_Due; ?> Paid_Amount; ?> + +       diff --git a/app/Views/loan_pdf.php b/app/Views/loan_pdf.php new file mode 100644 index 00000000..29167e32 --- /dev/null +++ b/app/Views/loan_pdf.php @@ -0,0 +1,49 @@ + + + + + + Loan Report + + + +

Employee Loan Report

+ + + + + + + + + + + +
Employee IDPAYEMPID; ?>
Employee NameFirstName; ?>
Basic PayBasic_Pay; ?>
Total SalaryTotalSalary; ?>
Loan AmountLoan_Amount; ?>
Loan Issued DateLoan_Issued_Date; ?>
Monthly DueMonthly_Due; ?>
Remaining DuesRemaining_Due; ?>
Paid AmountPaid_Amount; ?>
+ +

Loan History

+ + + + + + + + $value) { ?> + + + + + + + + +
Due AmountBalance AmountDue DateEntry Date
Due_Amount; ?>Balance_Amount; ?>Due_Date; ?>Entry_Date; ?>
+ + From f37b278c7f029ac0de006bb1b2b7ba2894e58822 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Wed, 26 Mar 2025 15:44:13 +0530 Subject: [PATCH 4/4] Emp and load detail export : GWM --- app/Controllers/Monthlypay.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Controllers/Monthlypay.php b/app/Controllers/Monthlypay.php index 623fed57..77302e3e 100755 --- a/app/Controllers/Monthlypay.php +++ b/app/Controllers/Monthlypay.php @@ -261,12 +261,12 @@ class Monthlypay extends BaseController } else { $W31OT = null; } - $totalworkinghrs = $data['Total Hrs']; + $totalworkinghrs = $data['Worked Hrs']; $totalothrs = $data['OT Hrs']; $paidleave = $data['Paid Leave']; $daysworked = $data['Days Worked']; $absent = $data['Absent']; - $sundayCount = $data['Total Sunday']; + $sundayCount = $data['Sunday']; $monthattendance = array( 'Month_Year' => $Month_Year, 'NoofDays' => $NoofDays, 'EmpID' => $EmpID, 'WH1' => $W1H, 'OT1' => $W1OT, 'WH2' => $W2H, 'OT2' => $W2OT, 'WH3' => $W3H, 'OT3' => $W3OT,