From df5b730056707344afecb5d773e908395552004e Mon Sep 17 00:00:00 2001 From: Smart Date: Thu, 24 Oct 2024 08:18:35 +0530 Subject: [PATCH 1/6] Merge : GWM --- app/Controllers/Sales.php | 2 +- app/Models/Employeedetails_model.php | 2 +- app/Views/employeeListing.php | 23 +++-------------------- app/Views/sales_dashboard.php | 23 ++++++++++++----------- app/Views/sales_invoice.php | 4 ++-- 5 files changed, 19 insertions(+), 35 deletions(-) diff --git a/app/Controllers/Sales.php b/app/Controllers/Sales.php index a7f60b98..970dafaf 100755 --- a/app/Controllers/Sales.php +++ b/app/Controllers/Sales.php @@ -33,7 +33,7 @@ class Sales extends BaseController $data['this_year_sales'] = $this->ipinvoice_model->thisYearSales(); $data['this_year_sales_trend'] = $this->ipinvoice_model->thisYearSalesTrend(); $data['get_today_invoices'] = $this->ipinvoice_model->getTodayInvoices(); - + // dd($data); // Define months from April to March $months = ['Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar']; diff --git a/app/Models/Employeedetails_model.php b/app/Models/Employeedetails_model.php index 37fcc01a..07678ecb 100755 --- a/app/Models/Employeedetails_model.php +++ b/app/Models/Employeedetails_model.php @@ -19,7 +19,7 @@ class Employeedetails_model extends Model $builder = $this->db->table('t_employee_details Emp') ->select(' Emp.*,Dep.DepartmentName as DepartmentName') ->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode', 'left') - ->orderBy("Emp.EmpID", "desc"); + ->orderBy("Emp.EmpID", "asc"); $query = $builder->get(); diff --git a/app/Views/employeeListing.php b/app/Views/employeeListing.php index fde4a92b..10cd0b72 100755 --- a/app/Views/employeeListing.php +++ b/app/Views/employeeListing.php @@ -155,24 +155,7 @@ - + - - - - - - - + + @@ -609,7 +593,9 @@ @@ -621,6 +607,7 @@ + + @@ -658,16 +649,16 @@ @@ -71,7 +71,7 @@

Sales in Rs.

- Sales, 2, '.', ','); ?> + Sales; ?>

@@ -101,7 +101,7 @@

Sales in Rs.

- Sales, 2, '.', ','); ?> + Sales; ?>

From bbba0d4de7c0bb6036263c668bcfce10beb666fb Mon Sep 17 00:00:00 2001 From: vadivel J Date: Thu, 24 Oct 2024 12:47:26 +0530 Subject: [PATCH 3/6] changes in employee module --- app/Controllers/Employeedetails.php | 115 ++++------------------------ app/Views/addEmployeenew.php | 4 +- app/Views/editEmployeenew.php | 23 +++--- 3 files changed, 30 insertions(+), 112 deletions(-) diff --git a/app/Controllers/Employeedetails.php b/app/Controllers/Employeedetails.php index 1c020e38..5344a673 100755 --- a/app/Controllers/Employeedetails.php +++ b/app/Controllers/Employeedetails.php @@ -199,37 +199,7 @@ class Employeedetails extends BaseController * This function is used to save the new Employee form in the database */ /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database - */ - /** - * This function is used to save the new Employee form in the database + */ @@ -249,6 +219,10 @@ class Employeedetails extends BaseController $photo->move($uploadDir, $newName); $Picture = $newName; } + else{ + echo "Incorrect file format provided"; + return false; + } } } // $Profile = $this->request->getPost('photo'); @@ -661,38 +635,7 @@ class Employeedetails extends BaseController } /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ - /* To Update the employee details*/ + function UpdateEmployee() @@ -700,41 +643,12 @@ class Employeedetails extends BaseController $EmpId = $this->request->getGet('empId'); - $PictureName = $this->request->getPost('Image'); - $ModifyPictureName = $this->request->getPost('ModifyImage'); + //if it is empty it means the default image is selected + $oldPictureName = $this->request->getPost('oldImageName'); $Picture = ""; - if ($PictureName != '') { - - - if (strlen((string)$ModifyPictureName) == 0) { - - $Picture = $PictureName; - } else { - - $photo = $this->request->getFile('ModifyImage'); - if (!$photo || !$photo->isValid()) { - $photo = $this->request->getFile('photo'); - } - if (isset($photo)) { - if ($photo->isValid() && !$photo->hasMoved()) { - $uploadDir = ROOTPATH . 'public/uploads/images/'; - $allowedTypes = ['jpg', 'jpeg', 'png', 'gif']; - if (in_array($photo->getExtension(), $allowedTypes)) { - $newName = $photo->getRandomName(); - if (!is_dir($uploadDir)) { - mkdir($uploadDir, 0777, true); - } - $photo->move($uploadDir, $newName); - $Picture = $newName; - } - } - } - } - } else { - //echo 'Not Exists'; - $photo = $this->request->getFile('photo'); - if (isset($photo)) { - if ($photo->isValid() && !$photo->hasMoved()) { + $photo = $this->request->getFile('photo'); + + if (isset($photo) && $photo->isValid() && !$photo->hasMoved()) { $uploadDir = ROOTPATH . 'public/uploads/images/'; $allowedTypes = ['jpg', 'jpeg', 'png', 'gif']; if (in_array($photo->getExtension(), $allowedTypes)) { @@ -745,10 +659,11 @@ class Employeedetails extends BaseController $photo->move($uploadDir, $newName); $Picture = $newName; } - } + + }else{ + $Picture=$oldPictureName; } - } - //echo $Picture; + $FirstName = $this->request->getPost('FirstName'); $LastName = $this->request->getPost('LastName'); diff --git a/app/Views/addEmployeenew.php b/app/Views/addEmployeenew.php index 690ced32..25f0e013 100755 --- a/app/Views/addEmployeenew.php +++ b/app/Views/addEmployeenew.php @@ -430,7 +430,7 @@
-
+
@@ -439,7 +439,7 @@
your image
+ alt="your image" style="width: 139px;" />
diff --git a/app/Views/editEmployeenew.php b/app/Views/editEmployeenew.php index e51b9720..202b2e4f 100755 --- a/app/Views/editEmployeenew.php +++ b/app/Views/editEmployeenew.php @@ -109,10 +109,13 @@ if (!empty($EmpDetails)) { } $isactive = $Emp->IsActive; + $ProfilePicPath=''; + if (!empty($Emp->ProfilePic)) { - $ProfilePic = 'public/uploads/images/' . $Emp->ProfilePic; + + $ProfilePicPath = base_url().'public/uploads/images/' . $Emp->ProfilePic; } else { - $ProfilePic = 'public/assets/dist/img/avatar.png'; + $ProfilePicPath = base_url().'public/assets/dist/img/avatar.png'; } $Reference_Name = $Emp->Reference_Name; $Reference_ContactNumber = $Emp->Reference_ContactNumber; @@ -199,7 +202,9 @@ if (!empty($EmpDetails)) {
- +
@@ -208,7 +213,7 @@ if (!empty($EmpDetails)) {
your image @@ -229,15 +234,13 @@ if (!empty($EmpDetails)) {
- - + +
From 198ab869129c27c36999b19bb79b8fc910e72c87 Mon Sep 17 00:00:00 2001 From: Smart Date: Thu, 24 Oct 2024 14:25:41 +0530 Subject: [PATCH 4/6] Auditor login Changes : GWM --- app/Views/AmendPOlist.php | 44 ++----- app/Views/POlist.php | 12 +- app/Views/includes/new_header.php | 3 +- app/Views/porelease_view.php | 196 ++++++------------------------ 4 files changed, 53 insertions(+), 202 deletions(-) diff --git a/app/Views/AmendPOlist.php b/app/Views/AmendPOlist.php index 48768bd1..e54990bc 100755 --- a/app/Views/AmendPOlist.php +++ b/app/Views/AmendPOlist.php @@ -4,8 +4,7 @@ .pagination { margin: 0px !important; } - - -