From: Alexander Smirnov Date: Wed, 26 Jun 2024 09:00:22 +0000 (+0300) Subject: Поправка правого борта выборки X-Git-Tag: 1.3~44^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=8c1c4a8b281d7fe813e19f657268801ba474757b;p=erp24_rep%2Fyii-erp24%2F.git Поправка правого борта выборки --- diff --git a/erp24/modul/orders/collation.php b/erp24/modul/orders/collation.php index 0b24e778..71e7c36b 100644 --- a/erp24/modul/orders/collation.php +++ b/erp24/modul/orders/collation.php @@ -143,12 +143,13 @@ foreach($data as $row) { $orders_cheking_status_array[$row["amo_id"]]=$row["status"]; -} - +} + +$delivery_date_plus = date("Y-m-d 23:59:59", strtotime("+2 day", strtotime($delivery_date))); $sql = "SELECT id, operation, summ, number, date, store_id_1c, order_id FROM sales WHERE date>='" . $delivery_date - . "'::date - INTERVAL '25 day' AND date<='" . $delivery_date . " 23:59:59' AND operation IN ('Возврат', 'Продажа') order by date DESC"; + . "'::date - INTERVAL '25 day' AND date<='" . $delivery_date_plus . "' AND operation IN ('Возврат', 'Продажа') AND order_id != '' order by date DESC"; $checkarr= $db::getRows($sql); //$cheks_txt=";