From: fomichev Date: Thu, 17 Jul 2025 08:23:59 +0000 (+0300) Subject: добавление allowed_editing X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=9caeaf849e04fc8dbdc9f746bbba9cc0b3b2e8be;p=erp24_rep%2Fyii-erp24%2F.git добавление allowed_editing --- diff --git a/erp24/migrations/m250717_080913_add_is_marketplace_allowed_editing_fields_to_marketplace_orders_1c_statuses_table.php b/erp24/migrations/m250717_080913_add_is_marketplace_allowed_editing_fields_to_marketplace_orders_1c_statuses_table.php index c8956845..056e6d25 100644 --- a/erp24/migrations/m250717_080913_add_is_marketplace_allowed_editing_fields_to_marketplace_orders_1c_statuses_table.php +++ b/erp24/migrations/m250717_080913_add_is_marketplace_allowed_editing_fields_to_marketplace_orders_1c_statuses_table.php @@ -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'); } diff --git a/erp24/records/MarketplaceOrder1cStatuses.php b/erp24/records/MarketplaceOrder1cStatuses.php index 4794d462..436e108a 100644 --- a/erp24/records/MarketplaceOrder1cStatuses.php +++ b/erp24/records/MarketplaceOrder1cStatuses.php @@ -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' => 'Разрешено редактирование' ]; } diff --git a/erp24/views/crud/marketplace-order1c-statuses/view.php b/erp24/views/crud/marketplace-order1c-statuses/view.php index 3428fc37..9910c926 100644 --- a/erp24/views/crud/marketplace-order1c-statuses/view.php +++ b/erp24/views/crud/marketplace-order1c-statuses/view.php @@ -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) {