From c269f2773b980321b1af95dab41800610167c8a2 Mon Sep 17 00:00:00 2001 From: DANYDHSV Date: Mon, 27 Jul 2026 12:22:22 -0600 Subject: [PATCH] =?UTF-8?q?feat:=20soporte=20para=20modo=20embebido=20(=3F?= =?UTF-8?q?embedded=3D1)=20y=20sincronizaci=C3=B3n=20con=20siip-cashier-to?= =?UTF-8?q?ols-ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- comprobantes/.gitkeep | 1 + public.php | 79 ++++++++++++++++++++++++++++++-- src/Facade/ClientCallBellAPI.php | 5 ++ 4 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 comprobantes/.gitkeep diff --git a/.gitignore b/.gitignore index af528155..ba89ba36 100755 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,8 @@ *.jrxml *.jasper vouchers_oxxo/ -comprobantes/ +comprobantes/* +!comprobantes/.gitkeep pack-plugin-versioned.php *.txt Callbell Public API.postman_collection.json diff --git a/comprobantes/.gitkeep b/comprobantes/.gitkeep new file mode 100644 index 00000000..35636d60 --- /dev/null +++ b/comprobantes/.gitkeep @@ -0,0 +1 @@ +# Keep directory in git diff --git a/public.php b/public.php index 10d3cf42..46281208 100755 --- a/public.php +++ b/public.php @@ -394,6 +394,15 @@ if (isset($_GET['action'])) { 'description' => mb_substr($job['description'] ?? '', 0, 80) ]; } + // Ordenar por fecha descendente (de más reciente a más antiguo) + usort($result, function ($a, $b) { + $dateA = $a['date'] ?? ''; + $dateB = $b['date'] ?? ''; + if ($dateA === $dateB) { + return 0; + } + return ($dateA > $dateB) ? -1 : 1; + }); echo json_encode($result); } catch (\Exception $e) { echo json_encode([]); @@ -477,7 +486,67 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador SIIP - Notificaciones y Pagos +