From: Alexander Smirnov Date: Thu, 20 Mar 2025 10:03:54 +0000 (+0300) Subject: [ERP-326] из afterSave X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=ad796d34158859af256881920d0850b297928219;p=erp24_rep%2Fyii-erp24%2F.git [ERP-326] из afterSave --- diff --git a/erp24/records/MarketplaceOrders.php b/erp24/records/MarketplaceOrders.php index 27b36090..47d7523e 100644 --- a/erp24/records/MarketplaceOrders.php +++ b/erp24/records/MarketplaceOrders.php @@ -106,6 +106,14 @@ class MarketplaceOrders extends \yii\db\ActiveRecord ]; } + public function afterSave($insert, $changedAttributes) { + parent::afterSave($insert, $changedAttributes); + + Yii::$app->queue->push(new \yii_app\jobs\SendTelegramTestMessageJob([ + 'message' => "Тестовое сообщение для https://tracker.yandex.ru/ERP-326 из afterSave " . $this->guid + ])); + } + public function getStore() { return $this->hasOne(CityStore::class, ['id' => 'store_id']); diff --git a/erp24/scripts/tasks/task_35_new_order_to_telegram.php b/erp24/scripts/tasks/task_35_new_order_to_telegram.php index 6381253f..cd1e2893 100644 --- a/erp24/scripts/tasks/task_35_new_order_to_telegram.php +++ b/erp24/scripts/tasks/task_35_new_order_to_telegram.php @@ -31,7 +31,7 @@ $infoText = ''; $description = ''; $result = 0; -$enable = true; +$enable = false; $start = false; $force = true;