]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-150 Присвоить каждому магазину ID склада
authormarina <m.zozirova@gmail.com>
Wed, 23 Oct 2024 14:00:53 +0000 (17:00 +0300)
committermarina <m.zozirova@gmail.com>
Wed, 23 Oct 2024 14:00:53 +0000 (17:00 +0300)
erp24/records/CityStore.php

index 34bdb0997f45031b2857f60303ea856d4371f78b..36e1d3f8b72ad1e34b091327f298c149ad299b45 100755 (executable)
@@ -265,6 +265,22 @@ class CityStore extends ActiveRecord
         return $result;
     }
 
+
+    public static function getAllActiveGuidId()
+    {
+        $result = [];
+
+        $values = self::find()->joinWith('storeGuid')
+            ->orderBy([self::tableName() . '.id' => SORT_ASC])->asArray()
+            ->all();
+
+        if (!empty($values)) {
+            $result = ArrayHelper::map($values,  'id', 'storeGuid.export_val');
+        }
+
+        return $result;
+    }
+
     public static function getCityStoreById(int $id, $withGuid = false): array
     {
         $query = self::find();