From: pavlikov_maxim Date: Mon, 22 Apr 2024 11:59:24 +0000 (+0300) Subject: фикс модуля couriers stats X-Git-Tag: 1.1~114^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=28db522afcf666984dd554346b6edbdd378b2034;p=erp24_rep%2Fyii-erp24%2F.git фикс модуля couriers stats --- diff --git a/erp24/modul/orders/couriersStats.php b/erp24/modul/orders/couriersStats.php index b34ef08c..c05564b8 100644 --- a/erp24/modul/orders/couriersStats.php +++ b/erp24/modul/orders/couriersStats.php @@ -21,15 +21,13 @@ if (!empty($_REQUEST["delivery"]) and $_REQUEST["delivery"] != "-1") { $delivery = htmlentities($_REQUEST["delivery"]); $where .= " AND delivery='$delivery' "; } -if (!empty($_REQUEST["dostavka_povtor_tip"]) and $_REQUEST["dostavka_povtor_tip"] != "-1") { +if (!empty($_REQUEST["dostavka_povtor_tip"]) && $_REQUEST["dostavka_povtor_tip"] != "-1") { $dostavka_povtor_tip = htmlentities($_REQUEST["dostavka_povtor_tip"]); $where .= " AND dostavka_povtor_tip='$dostavka_povtor_tip' "; } - - -if (!empty($_REQUEST["courier_id"]) and $_REQUEST["courier_id"] != "-1") { - $where .= " AND courier_id='$courier_id'"; +if (!empty($_REQUEST["courier_id"]) && $_REQUEST["courier_id"] != "-1") { $courier_id = (int)$_REQUEST["courier_id"]; + $where .= " AND courier_id='$courier_id'"; } @@ -39,6 +37,7 @@ foreach ($data as $row) echo "

Доставки курьеров

+request->getCsrfToken() . "\"/>
Дата доставки - -"; +echo ">-все-"; foreach ($cur_arr as $id => $name) { echo "
"; echo "
"; -$query = "SELECT * FROM orders_amo WHERE (status_id=142 or (status_id=143 and (price_dostavka_zatrat>0) ) ) - AND delivery_date>='$date1' AND delivery_date<='$date2' $where order by delivery_date desc,delivery_time ASC "; -$data = $db::getRows($query); +$data = $db::getRows("SELECT * FROM orders_amo WHERE (status_id=142 or (status_id=143 and (price_dostavka_zatrat>0) ) ) + AND delivery_date>='$date1' AND delivery_date<='$date2' $where order by delivery_date desc,delivery_time ASC"); echo "