]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
скрипт для объединения задублированных смен origin/merge_shifts_scripts
authormarina <m.zozirova@gmail.com>
Fri, 5 Jul 2024 16:45:25 +0000 (19:45 +0300)
committermarina <m.zozirova@gmail.com>
Fri, 5 Jul 2024 16:45:25 +0000 (19:45 +0300)
erp24/controllers/TimetableFactController.php

index 9fe5cd85bb89d77ff99d5713523687900ef3b442..97e55444e179317b7019c7294ae87767e15722b2 100644 (file)
@@ -301,7 +301,7 @@ class TimetableFactController extends Controller
         if ($action == 'applyPlus') {
             $plans = Timetable::find()
                 ->andWhere(['>=', 'date', '2024-07-01'])
-                ->andWhere(['<=', 'date', '2024-07-05'])
+                ->andWhere(['<=', 'date', date('Y-m-d')])
                 ->all();
 
             foreach ($plans as $plan) {
@@ -337,7 +337,7 @@ class TimetableFactController extends Controller
         $dataProvider = new ActiveDataProvider([
             'query' => TimetableFactModel::find()
                 ->andWhere(['>=', 'date_shift', '2024-07-01'])
-                ->andWhere(['<=', 'date_shift', '2024-07-05'])
+                ->andWhere(['<=', 'date_shift', date('Y-m-d')])
                 ->orderBy('date_shift, admin_id,id,  store_id'),
             'pagination' => [
                 'pageSize' => false