From b8a74ba30a72243be2fc1e06fc43e177a9901165 Mon Sep 17 00:00:00 2001 From: jekkos Date: Sat, 5 Oct 2024 02:24:51 +0200 Subject: [PATCH] Fix employee, supplier, customer (#4086) --- app/Controllers/Customers.php | 2 +- app/Controllers/Employees.php | 2 +- app/Controllers/Suppliers.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Customers.php b/app/Controllers/Customers.php index 2bd62add1..dea0b1201 100644 --- a/app/Controllers/Customers.php +++ b/app/Controllers/Customers.php @@ -90,7 +90,7 @@ class Customers extends Persons $search = $this->request->getGet('search'); $limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT); $offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT); - $sort = $this->sanitizeSortColumn(CUSTOMER_HEADERS, $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'person_id'); + $sort = $this->sanitizeSortColumn(CUSTOMER_HEADERS, $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'people.person_id'); $order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS); $customers = $this->customer->search($search, $limit, $offset, $sort, $order); diff --git a/app/Controllers/Employees.php b/app/Controllers/Employees.php index b3de87dd7..cd669022d 100644 --- a/app/Controllers/Employees.php +++ b/app/Controllers/Employees.php @@ -30,7 +30,7 @@ class Employees extends Persons $search = $this->request->getGet('search'); $limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT); $offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT); - $sort = $this->sanitizeSortColumn(PERSON_HEADERS, $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'person_id'); + $sort = $this->sanitizeSortColumn(PERSON_HEADERS, $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'people.person_id'); $order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS); $employees = $this->employee->search($search, $limit, $offset, $sort, $order); diff --git a/app/Controllers/Suppliers.php b/app/Controllers/Suppliers.php index caee78081..14f47954e 100644 --- a/app/Controllers/Suppliers.php +++ b/app/Controllers/Suppliers.php @@ -48,7 +48,7 @@ class Suppliers extends Persons $search = $this->request->getGet('search'); $limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT); $offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT); - $sort = $this->sanitizeSortColumn(SUPPLIER_HEADERS, $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'person_id'); + $sort = $this->sanitizeSortColumn(SUPPLIER_HEADERS, $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'people.person_id'); $order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS); $suppliers = $this->supplier->search($search, $limit, $offset, $sort, $order);