]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Merge branch 'develop' into feature_smirnov_erp-331_request_orders
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 27 Mar 2025 14:43:46 +0000 (17:43 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 27 Mar 2025 14:43:46 +0000 (17:43 +0300)
# Conflicts:
# erp24/records/MarketplaceOrders.php

1  2 
erp24/records/MarketplaceOrders.php

index 5b61e32caee620ab4f6c599b61bf11f03e0a66ed,62440766ae34eff188eb334744e8c6af1570426a..b7445fafad140452bfafe487b6b93e89b5eabcef
@@@ -30,19 -30,15 +30,25 @@@ use Yii
   * @property int|null $status_1c Статус заказа в 1С
   * @property int|null $marketplace_name Наименование маркетплейса 'ФлауВау' 'ЯндексМаркет'
   * @property int|null $marketplace_id ID маркетплейса: 1 - Flowwow, 2 - YandexMarket
 + * @property string $error_text
 + * @property string|null $number_1c Название документа в 1с
+  * @property string|null $telegram_error ошибка телеграмма
   */
  class MarketplaceOrders extends \yii\db\ActiveRecord
  {
+     const STATUS_TELEGRAM_NOT_SENT = 0;
+     const STATUS_TELEGRAM_PREPARED_TO_SEND = 1;
+     const STATUS_TELEGRAM_SENT = 2;
+     const STATUS_TELEGRAM_ERROR = 8;
 +    const STATUSES_1C_CREATED_IN_ERP = 1;
 +    const STATUSES_1C_CREATED_IN_1C = 2;
 +
 +    const STATUSES_1C = [
 +        self::STATUSES_1C_CREATED_IN_ERP => 'Создан в ЕРП',
 +        self::STATUSES_1C_CREATED_IN_1C => 'Создан в 1C',
 +    ];
 +
      /**
       * {@inheritdoc}
       */
              [['marketplace_order_id', 'marketplace_id', 'marketplace_name', 'status_id', 'substatus_id', 'creation_date', 'updated_at', 'total', 'delivery_total', 'buyer_total_before_discount', 'tax_system', 'payment_type', 'payment_method'], 'required'],
              [['store_id', 'status_id', 'substatus_id', 'fake', 'cancel_requested', 'status_1c'], 'default', 'value' => null],
              [[ 'fake'], 'default', 'value' => 0],
-             [['store_id', 'status_id', 'substatus_id', 'fake', 'cancel_requested', 'status_1c', 'marketplace_id'], 'integer'],
+             [['store_id', 'status_id', 'substatus_id', 'fake', 'cancel_requested', 'status_1c', 'marketplace_id', 'status_telegram'], 'integer'],
              [['creation_date', 'updated_at', 'returned_at'], 'safe'],
-             [['return_data', 'raw_data', 'marketplace_name', 'error_text'], 'string'],
+             [['return_data', 'raw_data', 'marketplace_name', 'telegram_error'], 'string'],
              [['total', 'delivery_total', 'buyer_total_before_discount'], 'number'],
              [['marketplace_order_id'], 'string', 'max' => 64],
 +            [['number_1c'], 'string', 'max' => 100],
              [['warehouse_guid', 'guid'], 'string', 'max' => 36],
              [['tax_system', 'payment_type', 'payment_method'], 'string', 'max' => 32],
              [['marketplace_order_id'], 'unique'],
              'status_1c' => 'Статус заказа в 1С',
              'marketplace_name' => 'Наименование маркетплейса',
              'marketplace_id' => 'ID маркетплейса: 1 - Flowwow, 2 - YandexMarket',
 +            'error_text' => 'Ошибка',
 +            'number_1c' => 'Номер документа в 1с',
+             'status_telegram' => 'Статус отправки в телеграм',
+             'telegram_error' => 'Ошибка телеграмма',
          ];
      }