]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
добавление allowed_editing
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 17 Jul 2025 08:23:59 +0000 (11:23 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 17 Jul 2025 08:23:59 +0000 (11:23 +0300)
erp24/migrations/m250717_080913_add_is_marketplace_allowed_editing_fields_to_marketplace_orders_1c_statuses_table.php
erp24/records/MarketplaceOrder1cStatuses.php
erp24/views/crud/marketplace-order1c-statuses/view.php

index c89568454fe31c49415a9a3a72eac561ba5ba195..056e6d252b0c197ab7494943619a6d96fde1ef2f 100644 (file)
@@ -15,13 +15,6 @@ class m250717_080913_add_is_marketplace_allowed_editing_fields_to_marketplace_or
             return;
         }
 
-        if (!$this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('is_marketplace')) {
-            $this->addColumn(
-                self::TABLE_NAME,
-                'is_marketplace',
-                $this->integer()->defaultValue(1)->comment('Метка заказа из маркетплейса'),
-            );
-        }
         if (!$this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('allowed_editing')) {
             $this->addColumn(
                 self::TABLE_NAME,
@@ -36,9 +29,6 @@ class m250717_080913_add_is_marketplace_allowed_editing_fields_to_marketplace_or
      */
     public function safeDown()
     {
-        if ($this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('is_marketplace')) {
-            $this->dropColumn(self::TABLE_NAME, 'is_marketplace');
-        }
         if ($this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('allowed_editing')) {
             $this->dropColumn(self::TABLE_NAME, 'allowed_editing');
         }
index 4794d46214acf687cc68b594a07bc70697c748cd..436e108a28e36f5d40edefe3ca25553de0931809 100644 (file)
@@ -18,7 +18,6 @@ use yii\db\ActiveQuery;
  * @property int $posit Порядок статусов
  * @property int|null $order_status_id Ссылка на статус заказа в МП
  * @property int|null $order_substatus_id Ссылка на субстатус заказа в МП
- * @property int $is_marketplace Метка заказа из маркетплейса
  * @property int allowed_editing Разрешено редактирование
  */
 class MarketplaceOrder1cStatuses extends \yii\db\ActiveRecord
@@ -63,7 +62,6 @@ class MarketplaceOrder1cStatuses extends \yii\db\ActiveRecord
                 'allowed_closing',
                 'order_status_id',
                 'order_substatus_id',
-                'is_marketplace',
                 'allowed_editing'
                 ], 'integer'],
             [['status_instruction', 'status_id'], 'string'],
@@ -87,7 +85,6 @@ class MarketplaceOrder1cStatuses extends \yii\db\ActiveRecord
             'posit' => 'Порядок статусов',
             'order_status_id' => 'Ссылка на статус заказа в МП',
             'order_substatus_id' => 'Ссылка на субстатус заказа в МП',
-            'is_marketplace' => 'Метка заказа из маркетплейса',
             'allowed_editing' => 'Разрешено редактирование'
         ];
     }
index 3428fc3704b7ebf19e1faaa0189f4c19b6e0eec3..9910c926af59f5d21c5b269c09aa7f38be69b61c 100644 (file)
@@ -61,12 +61,6 @@ $this->params['breadcrumbs'][] = $this->title;
                     return $model->allowed_editing === 0 ? 'Нет' : 'Да';
                 }
             ],
-            [
-                'attribute' => 'is_marketplace',
-                'value' => function ($model) {
-                    return $model->is_marketplace === 0 ? 'Нет' : 'Да';
-                }
-            ],
             [
                 'attribute' => 'order_status_id',
                 'value' => function ($model) {