From: marina Date: Fri, 5 Jul 2024 16:45:25 +0000 (+0300) Subject: скрипт для объединения задублированных смен X-Git-Tag: 1.3~1^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=6f81aaa2e0c1e504a63884d4f85bf8a17035263b;p=erp24_rep%2Fyii-erp24%2F.git скрипт для объединения задублированных смен --- diff --git a/erp24/controllers/TimetableFactController.php b/erp24/controllers/TimetableFactController.php index 9fe5cd85..97e55444 100644 --- a/erp24/controllers/TimetableFactController.php +++ b/erp24/controllers/TimetableFactController.php @@ -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