]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-258] отсортировал продукты по группам, номенклатуру 1% на первое место
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 5 Dec 2024 13:32:34 +0000 (16:32 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 5 Dec 2024 13:32:34 +0000 (16:32 +0300)
erp24/controllers/ShiftTransferController.php

index 96b75e4c1a9d2871d1110247aeca1ce84697ceed..f601b015d0c6e7a5725931b210006bc72b4ba56c 100644 (file)
@@ -54,7 +54,7 @@ class ShiftTransferController extends Controller
     public function buildLoadDataShiftRemains($groups, $storeGuid) {
         $productsClass = ProductsClass::find()->select(['category_id'])->where(['tip' => $groups])->column();
         $products = ArrayHelper::map(Products1c::find()->select(['id', 'name'])
-            ->where(['parent_id' => $productsClass])->orderBy(['name' => SORT_ASC])->all(), 'id', 'name');
+            ->where(['parent_id' => $productsClass])->orderBy(['name' => SORT_ASC, 'parent_id' => SORT_DESC])->all(), 'id', 'name');
         $balance = ArrayHelper::map(Balances::find()->select(['quantity', 'product_id'])
             ->where(['store_id' => $storeGuid])->all(), 'product_id', 'quantity');
         $productGuids = [];