From: marina Date: Tue, 17 Jun 2025 11:01:56 +0000 (+0300) Subject: ERP-360 Сборка страницы автопм X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=f959c272c2d75b7d0641bd76d95d1d98ee5b329d;p=erp24_rep%2Fyii-erp24%2F.git ERP-360 Сборка страницы автопм --- diff --git a/erp24/api2/controllers/OrdersController.php b/erp24/api2/controllers/OrdersController.php index 1f6f09dc..8ab6caec 100644 --- a/erp24/api2/controllers/OrdersController.php +++ b/erp24/api2/controllers/OrdersController.php @@ -199,9 +199,9 @@ class OrdersController extends BaseController } $storesGuidId = array_flip(array_filter(CityStore::getAllActiveGuidId(), fn($v) => is_int($v) || is_string($v))); - $storeGuid = $data['store-guid'] ?? null; + $storeGuid = $data['store_id'] ?? null; if (empty($storeGuid)) { - throw new \Exception('store-guid не передан или пуст'); + throw new \Exception('store_id не передан или пуст'); } $storeId = $storesGuidId[$storeGuid]; @@ -219,15 +219,12 @@ class OrdersController extends BaseController $result = []; foreach ($orders as $order) { $products = []; - $productsWithoutGuid = []; foreach ($order->items as $product) { $product1c = Products1c::findOne(['articule' => $product->offer_id]); if ($product1c) { $products[$product1c->id] = $product->count; - } else { - $productsWithoutGuid[$product->offer_name] = $product->count; } } @@ -235,7 +232,6 @@ class OrdersController extends BaseController 'order_id' => $order->guid, 'status' => $order->status_id, 'products' => $products, - 'products_without_guid' => $productsWithoutGuid, ]; }