From 5dff97bc12fa6311404342030d8338c1f3020b67 Mon Sep 17 00:00:00 2001 From: Abderrahim Darghal Belkacemi Date: Thu, 26 Mar 2026 12:05:04 +0100 Subject: [PATCH 1/2] fix: dumping all clientes without limit --- Controller/NewServicioAT.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Controller/NewServicioAT.php b/Controller/NewServicioAT.php index c08bde4..388a071 100644 --- a/Controller/NewServicioAT.php +++ b/Controller/NewServicioAT.php @@ -77,12 +77,12 @@ public function getModalCustomers(): array // consultamos la base de datos $cliente = new Cliente(); - $where = [Where::isNull('fechabaja')]; + $where = [Where::eq('fechabaja', null)]; if ($this->permissions->onlyOwnerData && !$showAll) { - $where[] = Where::column('codagente', $this->user->codagente); - $where[] = Where::isNotNull('codagente'); + $where[] = Where::eq('codagente', $this->user->codagente); + $where[] = Where::notEq('codagente', null); } - $clientes = $cliente->all($where, ['LOWER(nombre)' => 'ASC']); + $clientes = $cliente->all($where, ['LOWER(nombre)' => 'ASC'], 0, 50); // guardamos en caché Cache::set($cacheKey, $clientes); From 2a86e75960103811a830e93e0974f1f50b5789a4 Mon Sep 17 00:00:00 2001 From: Abderrahim Darghal Belkacemi Date: Thu, 26 Mar 2026 12:11:05 +0100 Subject: [PATCH 2/2] fix: uncongruent where --- Controller/NewServicioAT.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller/NewServicioAT.php b/Controller/NewServicioAT.php index 388a071..6cece25 100644 --- a/Controller/NewServicioAT.php +++ b/Controller/NewServicioAT.php @@ -77,10 +77,10 @@ public function getModalCustomers(): array // consultamos la base de datos $cliente = new Cliente(); - $where = [Where::eq('fechabaja', null)]; + $where = [Where::isNull('fechabaja')]; if ($this->permissions->onlyOwnerData && !$showAll) { $where[] = Where::eq('codagente', $this->user->codagente); - $where[] = Where::notEq('codagente', null); + $where[] = Where::isNotNull('codagente'); } $clientes = $cliente->all($where, ['LOWER(nombre)' => 'ASC'], 0, 50);