From: Alexander Smirnov Date: Wed, 7 Aug 2024 11:19:10 +0000 (+0300) Subject: [ERP-135] Спрятать магазины с visible=0 X-Git-Tag: 1.7~224^2~1 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=a6923b3263a9cf31b4b39562a5b896d6fdd39f89;p=erp24_rep%2Fyii-erp24%2F.git [ERP-135] Спрятать магазины с visible=0 --- diff --git a/erp24/actions/motivation/IndexAction.php b/erp24/actions/motivation/IndexAction.php index f745fa06..f738eac6 100644 --- a/erp24/actions/motivation/IndexAction.php +++ b/erp24/actions/motivation/IndexAction.php @@ -54,7 +54,7 @@ class IndexAction extends Action $motivations = Motivation::find()->all(); $possibleStoreIds = ArrayHelper::getColumn($motivations, 'store_id'); - $stores = ArrayHelper::map(CityStore::find()->all(), 'id', 'name'); + $stores = ArrayHelper::map(CityStore::find()->where(['visible' => 1])->all(), 'id', 'name'); $stores = array_filter($stores, function ($k, $v) use ($possibleStoreIds) { return in_array($v, $possibleStoreIds); }, ARRAY_FILTER_USE_BOTH);