From a307b53f8e75e25b031e84e854124292e4081ef3 Mon Sep 17 00:00:00 2001 From: marina Date: Tue, 16 Jul 2024 12:28:20 +0300 Subject: [PATCH] =?utf8?q?ERP-112=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?utf8?q?=D0=BD=D0=B8=D1=8F=20=D0=B2=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF?= =?utf8?q?=D1=82=D0=B5=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=B4=D0=B8=D0=BD=D0=B5?= =?utf8?q?=D0=BD=D0=B8=D1=8F=20=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D0=B2=20?= =?utf8?q?=D1=81=D0=BC=D0=B5=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/commands/TimetableController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erp24/commands/TimetableController.php b/erp24/commands/TimetableController.php index 6a456ffe..129f0bef 100644 --- a/erp24/commands/TimetableController.php +++ b/erp24/commands/TimetableController.php @@ -11,7 +11,9 @@ use yii_app\records\AdminCheckin; class TimetableController extends Controller { public function actionAutocloseShifts() { - $timetableFactModels = TimetableFactModel::find()->with(['checkinStart'])->where(['status' => AdminCheckin::TYPE_START]) + $timetableFactModels = TimetableFactModel::find() + ->with(['checkinStart']) + ->andWhere(['!=', 'is_close', true]) ->andWhere(['<=', new Expression('CONCAT(date_start, \' \', time_start)'), date('Y-m-d H:i:s', strtotime('-14 hours', time()))])->all(); foreach ($timetableFactModels as $timetableFactModel) { -- 2.39.5