From 280e718d57edc30bb3e42311ea34117d2abd603f Mon Sep 17 00:00:00 2001 From: marina Date: Fri, 5 Jul 2024 06:24:05 +0300 Subject: [PATCH] =?utf8?q?ERP-65=20=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=B5?= =?utf8?q?=D1=81=D1=82=D0=B8=20=D0=B2=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B9=20?= =?utf8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B8?= =?utf8?q?=D0=B9=20=D1=82=D0=B0=D0=B1=D0=B5=D0=BB=D1=8C=20=D0=B2=D1=81?= =?utf8?q?=D0=B5=20=D1=81=D0=BC=D0=B5=D0=BD=D1=8B=20=D1=81=D0=BE=D1=82?= =?utf8?q?=D1=80=D1=83=D0=B4=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2,=20=D0=BA=D0=BE?= =?utf8?q?=D1=82=D0=BE=D1=80=D1=8B=D0=B5=20=D0=B1=D1=8B=D0=BB=D0=B8=20?= =?utf8?q?=D0=B4=D0=BE=2013.06?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/TimetableFactController.php | 8 ++------ erp24/views/timetable-fact/add-old-shifts.php | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/erp24/controllers/TimetableFactController.php b/erp24/controllers/TimetableFactController.php index 197076e9..62735d0e 100644 --- a/erp24/controllers/TimetableFactController.php +++ b/erp24/controllers/TimetableFactController.php @@ -156,7 +156,7 @@ class TimetableFactController extends Controller $query = Timetable::find() ->alias('t') ->andWhere(['>=', 't.date', '2024-06-01']) - ->andWhere(['<', 't.date', date('Y-m-d')]) + ->andWhere(['<', 't.date', '2024-06-14']) ->andWhere(new \yii\db\Expression('EXISTS (SELECT 1 FROM admin_checkin ac WHERE ac.plan_id = "t".id)')) ->select([ 't.*', @@ -173,11 +173,7 @@ class TimetableFactController extends Controller ->andWhere(['store_id' => $timetable->store_id]) ->one(); - if ($newFact) { - $newFact->plan_id = $timetable->plan_id; - $newFact->tabel = $timetable->tabel; - $newFact->save(); - } else { + if (!$newFact) { $adminCheckinStart = AdminCheckin::find() ->andWhere(['plan_id' => $timetable->id]) ->orderBy('id asc') diff --git a/erp24/views/timetable-fact/add-old-shifts.php b/erp24/views/timetable-fact/add-old-shifts.php index e5e3f844..94ca2add 100644 --- a/erp24/views/timetable-fact/add-old-shifts.php +++ b/erp24/views/timetable-fact/add-old-shifts.php @@ -31,7 +31,7 @@ use \yii\widgets\ActiveForm;
- + 'btn btn-warning btn-lg', 'name' => 'action', 'value' => 'applyPlus']) ?> -- 2.39.5