From: marina Date: Wed, 23 Oct 2024 14:00:53 +0000 (+0300) Subject: ERP-150 Присвоить каждому магазину ID склада X-Git-Tag: 1.6~27^2~1 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=b2129bfa771b52e6e4058bc24bf42a4acebe0f16;p=erp24_rep%2Fyii-erp24%2F.git ERP-150 Присвоить каждому магазину ID склада --- diff --git a/erp24/records/CityStore.php b/erp24/records/CityStore.php index 34bdb099..36e1d3f8 100755 --- a/erp24/records/CityStore.php +++ b/erp24/records/CityStore.php @@ -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();