]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
fix fix_closing_shift origin/fix_closing_shift
authormarina <m.zozirova@gmail.com>
Thu, 8 Aug 2024 05:31:41 +0000 (08:31 +0300)
committermarina <m.zozirova@gmail.com>
Thu, 8 Aug 2024 05:31:41 +0000 (08:31 +0300)
erp24/actions/timetable/StartShiftStepTwoAction.php

index f6b9c92b85bdb7f71f520ed52acdb6fd8fffc6c0..212823b51a819db2c15ae215c5f4381813b540b1 100755 (executable)
@@ -141,13 +141,6 @@ class StartShiftStepTwoAction extends Action
             $model->load($this->controller->request->post());
             $model->photo = UploadedFile::getInstance($model, 'photo');
             $validate = $model->validate();
-            $maxShiftDuration = max(ArrayHelper::getColumn(Shift::all(), 'duration'));
-            var_dump(AdminCheckin::find()
-                ->andWhere(['admin_id' => $model->admin_id])
-                ->andWhere(['>', 'time', date('Y-m-d H:i:s', strtotime("-$maxShiftDuration hour"))])
-                ->orderBy(['time' => SORT_DESC])
-                ->limit(1)->createCommand()->getRawSql());
-            var_dump($model->getErrors(), $model);die();
             if ($validate) {
                 $model->save();
                 $model->checkin_id = $model->checkinModel->id;