index change number 10000

This commit is contained in:
Flatlogic Bot 2026-05-03 10:51:05 +00:00
parent 2452f9f5e7
commit b35541a46d

View File

@ -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();