From e371d16cad1eb75343616a42354ae7df1da4f0ac Mon Sep 17 00:00:00 2001 From: Antonio Date: Wed, 16 Sep 2026 22:42:32 +0200 Subject: [PATCH] Fix open services KPI filters --- Controller/ReportServicioAT.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Controller/ReportServicioAT.php b/Controller/ReportServicioAT.php index 824f041..d0d55ed 100644 --- a/Controller/ReportServicioAT.php +++ b/Controller/ReportServicioAT.php @@ -171,6 +171,7 @@ protected function loadOpenServicesLastMonth(): void { $since = date('Y-m-d', strtotime('-1 month')); $sql = "SELECT COUNT(*) as total FROM serviciosat WHERE fecha >= '" . $since . "'" + . ' AND editable = ' . $this->db()->var2str(true) . ' AND idempresa = ' . $this->db()->var2str($this->idempresa); $result = $this->db()->select($sql); $this->openServicesLastMonth = (int)($result[0]['total'] ?? 0); @@ -180,6 +181,7 @@ protected function loadOpenServicesLastYear(): void { $since = date('Y-m-d', strtotime('-1 year')); $sql = "SELECT COUNT(*) as total FROM serviciosat WHERE fecha >= '" . $since . "'" + . ' AND editable = ' . $this->db()->var2str(true) . ' AND idempresa = ' . $this->db()->var2str($this->idempresa); $result = $this->db()->select($sql); $this->openServicesLastYear = (int)($result[0]['total'] ?? 0);