]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-122 Поправить открытие/закрытие смен на Южном бульваре origin/bug_zozirova_erp-122_fix_closing
authormarina <m.zozirova@gmail.com>
Wed, 24 Jul 2024 05:27:47 +0000 (08:27 +0300)
committermarina <m.zozirova@gmail.com>
Wed, 24 Jul 2024 05:27:47 +0000 (08:27 +0300)
erp24/forms/timetable/StartForm.php

index fb9be7a2ef92723aa4866d73fb7078d197d0f7bb..b7ad917858e9e215d9c6526e5403186e3e116a4b 100755 (executable)
@@ -111,7 +111,7 @@ class StartForm extends Model
             [['admin_id', 'store_id', 'device_id', 'type_id', 'd_id', 'ball', 'date'], 'required'],
             [['d_id'], 'exist', 'targetClass' => AdminGroup::class, 'targetAttribute' => 'id'],
             [['store_id'], function() {
-                $targetAdminId = $this->replaced_admin_id ?: $this->admin_id;
+                $targetAdminId = $this->admin_id ?: $this->replaced_admin_id;
                 /** @var Admin $targetAdmin */
                 $targetAdmin = Admin::find()->andWhere(['id' => $targetAdminId])->one();
                 if (!in_array($this->store_id, $targetAdmin->getStoreIds())) {