From: marina Date: Tue, 16 Jul 2024 09:28:20 +0000 (+0300) Subject: ERP-112 Изменения в скрипте объединения фактов смен X-Git-Tag: 1.4~76^2~1 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=a307b53f8e75e25b031e84e854124292e4081ef3;p=erp24_rep%2Fyii-erp24%2F.git ERP-112 Изменения в скрипте объединения фактов смен --- 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) {