From: Alexander Smirnov Date: Thu, 24 Apr 2025 13:27:50 +0000 (+0300) Subject: draft table no search form X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=c69400c794f368a18170b5beb2ebdb5231a6e76c;p=erp24_rep%2Fyii-erp24%2F.git draft table no search form --- diff --git a/erp24/modul/sales_checks/index.php b/erp24/modul/sales_checks/index.php index 86c93db5..acdfada8 100644 --- a/erp24/modul/sales_checks/index.php +++ b/erp24/modul/sales_checks/index.php @@ -1,10 +1,8 @@ -='$date1 00:00:00'"; $get .="&date1=$date1"; } if(!empty($_REQUEST["date2"])) { $date2=htmlentities($_REQUEST["date2"]); $where .=" AND date<='$date2 23:59:59'"; $get .="&date2=$date2"; } -$where .="order by $sort_by $asc_desc"; +$where .=" group by id, date order by $sort_by $asc_desc"; // получаем кол-во записей -$resultNum = $db::getRow("SELECT COUNT(*) as postNum FROM sales WHERE 1 $where ",$binding); //'%'.$name.'%' -$rowCount = $resultNum['postNum']; +$resultNum = $db::getRow("SELECT COUNT(*) as postNum FROM sales WHERE 1=1 $where ",$binding); //'%'.$name.'%' +$rowCount = $resultNum['postnum']; $limit = 100; $offset = !empty($_GET['p'])?(($_GET['p']-1)*$limit):0; @@ -60,15 +58,15 @@ $offset=(int)$offset; echo"
" . '' . -"наименование чека +"наименование чека -Телефон +Телефон -Операция +Операция -Сумма +Сумма -GUID чека +GUID чека Дата -Дата2 @@ -96,7 +94,7 @@ echo'
'; -$data = $db::getRows("SELECT * FROM sales WHERE 1 $where LIMIT $offset,$limit",$binding); +$data = $db::getRows("SELECT * FROM sales WHERE 1=1 $where LIMIT $limit OFFSET $offset",$binding); echo""; foreach ($data as $row) { @@ -105,7 +103,7 @@ if($row["operation"]=="Удален") echo'danger'; if($row["operation"]=="Возврат") echo'warning'; echo'"> '.$row["operation"].' '.$row["status"].' - +
'.$row["date"].''.$store_arr[$row["store_id_1c"]].', '.$user_arr[$row["seller_id"]].''.($store_arr[$row["store_id_1c"]] ?? '').', '.($user_arr[$row["seller_id"]] ?? '').' '.$row["number"].''.$row["summ"].' '; @@ -113,7 +111,7 @@ if(!empty($row["skidka"])) echo'скидка '.$row["skidka"].''; echo' '; -if(!empty($row["phone"])) echo'бонусная '.$row["phone"].''; +if(!empty($row["phone"])) echo'бонусная '.$row["phone"].''; if(!empty($row["order_id"])) echo'заказ с сайта '.$row["order_id"].'';