$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),
':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,
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