|
|
|
|
|
|
|
|
$dataProviderProducer = new ActiveDataProvider([ |
|
|
$dataProviderProducer = new ActiveDataProvider([ |
|
|
'query' => Producer::find() |
|
|
'query' => Producer::find() |
|
|
->with('userProducer', 'user') |
|
|
->with('userProducer', 'user') |
|
|
->orderBy('free_price DESC'), |
|
|
|
|
|
|
|
|
->orderBy('active DESC, free_price DESC'), |
|
|
'pagination' => [ |
|
|
'pagination' => [ |
|
|
'pageSize' => 1000, |
|
|
'pageSize' => 1000, |
|
|
], |
|
|
], |
|
|
]); |
|
|
]); |
|
|
|
|
|
|
|
|
$producersArray = Producer::find() |
|
|
|
|
|
->with('userProducer', 'user') |
|
|
|
|
|
->orderBy('free_price DESC') |
|
|
|
|
|
->all(); |
|
|
|
|
|
|
|
|
$producersArray = Producer::find()->where('active = 1')->all(); |
|
|
|
|
|
|
|
|
$sumFreePrice = 0 ; |
|
|
$sumFreePrice = 0 ; |
|
|
foreach($producersArray as $producer) { |
|
|
foreach($producersArray as $producer) { |