]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Добавляем статусы через отношения feature_fomichev_erp-20251010_fix_status_id
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Mon, 13 Oct 2025 06:58:42 +0000 (09:58 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Mon, 13 Oct 2025 06:58:42 +0000 (09:58 +0300)
erp24/api2/controllers/OrdersController.php
erp24/records/MarketplaceOrders.php

index 8c534c2ccecfdce6d1a21bc4b58ffd4d83671499..66986f7362e493daa99aa6300541b113e9d86607 100644 (file)
@@ -242,7 +242,7 @@ class OrdersController extends BaseController
 
             $orders = MarketplaceOrders::find()
                 ->with('items')
-                ->with('status1c')
+                ->with('status1C')
                 ->where(['store_id' => $storeId])
                 ->andWhere(['>=', 'creation_date', $startTime->format('Y-m-d H:i:s')])
                 ->andWhere(['<=', 'creation_date', $currentTime->format('Y-m-d H:i:s')])
@@ -267,7 +267,7 @@ class OrdersController extends BaseController
 
                 $result[] = [
                     'order_id' => $order->guid,
-                    'status' => $order->status1c ? $order->status1C->status_id : null,
+                    'status' => $order->status1C ? $order->status1C->status_id : null,
                     'items' => $items,
                 ];
             }
index e136c71457fb6c3d9d45c5d5c10ee7251a42ed5f..9c60953ba66116f791126e55effbfa65e5bf0966 100644 (file)
@@ -187,7 +187,7 @@ class MarketplaceOrders extends \yii\db\ActiveRecord
         return $this->hasMany(MarketplaceOrderItems::class, ['order_id' => 'id']);
     }
 
-    public function getStatus1c()
+    public function getStatus1C()
     {
         return $this->hasOne(MarketplaceOrder1cStatuses::class, ['id' => 'status_processing_1c']);
     }