From: marina Date: Thu, 30 Jan 2025 11:43:23 +0000 (+0300) Subject: ERP-282 Нужно сделать интерфейс настройки магазина X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=e6b921818511e7236081f3a5917fc437109bbdd2;p=erp24_rep%2Fyii-erp24%2F.git ERP-282 Нужно сделать интерфейс настройки магазина --- 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