From b35541a46dc6474c158f316153fd977f47215495 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 3 May 2026 10:51:05 +0000 Subject: [PATCH] index change number 10000 --- index.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 86146d1..fbc850d 100644 --- a/index.php +++ b/index.php @@ -861,12 +861,15 @@ if (!function_exists('sales_purchases_load_logic')) { $outletJoinSql = 'LEFT JOIN outlets o ON v.outlet_id = o.id'; } - $stmt = db()->prepare("SELECT v.*, c.name as customer_name, $customerTaxSelect as customer_tax_id, c.phone as customer_phone, $outletSelectSql \ - FROM $table v \ - LEFT JOIN $cust_supplier_table c ON v.$cust_supplier_col = c.id \ - $outletJoinSql\ - WHERE $whereSql \ - ORDER BY v.id DESC LIMIT $limit OFFSET $offset"); + $invoiceSql = implode(' ', [ + "SELECT v.*, c.name as customer_name, $customerTaxSelect as customer_tax_id, c.phone as customer_phone, $outletSelectSql", + "FROM $table v", + "LEFT JOIN $cust_supplier_table c ON v.$cust_supplier_col = c.id", + $outletJoinSql, + "WHERE $whereSql", + "ORDER BY v.id DESC LIMIT $limit OFFSET $offset", + ]); + $stmt = db()->prepare($invoiceSql); $stmt->execute($params); $data['invoices'] = $stmt->fetchAll();