]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
fix providers
authorAlexander Smirnov <fredeom@mail.ru>
Wed, 17 Apr 2024 08:41:52 +0000 (11:41 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Wed, 17 Apr 2024 08:41:52 +0000 (11:41 +0300)
erp24/actions/shipment/AddAction.php
erp24/records/StoreOrders.php

index 1ed7bbb7c30639c68ca05046ca484bc0a5a4226f..def46e5cf07be5d6f09af911e821fe918862e913 100644 (file)
@@ -14,7 +14,7 @@ class AddAction extends Action
     public function run($id) {
         $model = StoreOrders::find()->where(['id' => $id])->one();
         /** @var $model StoreOrders */
-
+        $model->getProviders();
         if (Yii::$app->request->isPost && $model->load(Yii::$app->request->post())) {
             $model->setProviders();
             $model->price_logistic = 0;
index 074dadde0f8d58ddce08951aabaabc9d571f5bef..6403dab8634b79f27d12cec181386645fe248c8b 100644 (file)
@@ -85,4 +85,9 @@ class StoreOrders extends \yii\db\ActiveRecord
     {
         $this->providers_arr = implode(',', $this->providers);
     }
+
+    public function getProviders()
+    {
+        $this->providers = explode(',', $this->providers_arr);
+    }
 }