From e6b921818511e7236081f3a5917fc437109bbdd2 Mon Sep 17 00:00:00 2001 From: marina Date: Thu, 30 Jan 2025 14:43:23 +0300 Subject: [PATCH] =?utf8?q?ERP-282=20=D0=9D=D1=83=D0=B6=D0=BD=D0=BE=20?= =?utf8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=D1=8C=20=D0=B8=D0=BD=D1=82?= =?utf8?q?=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81=20=D0=BD=D0=B0=D1=81=D1=82?= =?utf8?q?=D1=80=D0=BE=D0=B9=D0=BA=D0=B8=20=D0=BC=D0=B0=D0=B3=D0=B0=D0=B7?= =?utf8?q?=D0=B8=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/services/SalesService.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/erp24/services/SalesService.php b/erp24/services/SalesService.php index da932537..33b037f2 100755 --- a/erp24/services/SalesService.php +++ b/erp24/services/SalesService.php @@ -1125,7 +1125,7 @@ class SalesService $connection = Yii::$app->getDb(); if ($dateFrom > '2022-12-07') { - if ($dateFrom > '2025-01-01') { + if ($dateFrom >= '2025-01-01') { $command = $connection->createCommand(" SELECT DISTINCT (sales.id), @@ -1502,8 +1502,9 @@ class SalesService ':date_to' => DateHelper::getDateTimeEndDay($dateTo, $dateTimeEndDay, $adminId), ] ); - } else if ($dateFrom > '2025-01-01') { - $command = $connection->createCommand(" + + if ($dateFrom >= '2025-01-01') { + $command = $connection->createCommand(" SELECT DISTINCT (sales.id), p.seller_id, @@ -1544,10 +1545,11 @@ class SalesService ORDER BY sales.date ASC ", [ - ':date_from' => DateHelper::getDateTimeStartDay($dateFrom, $dateTimeStartDay, $adminId), - ':date_to' => DateHelper::getDateTimeEndDay($dateTo, $dateTimeEndDay, $adminId), - ] - ); + ':date_from' => DateHelper::getDateTimeStartDay($dateFrom, $dateTimeStartDay, $adminId), + ':date_to' => DateHelper::getDateTimeEndDay($dateTo, $dateTimeEndDay, $adminId), + ] + ); + } } else { $command = $connection->createCommand(" SELECT -- 2.39.5