|
|
@@ -47,8 +47,10 @@ class CommandeautoController extends BackendController { |
|
|
|
{ |
|
|
|
$dataProvider = new ActiveDataProvider([ |
|
|
|
'query' => CommandeAuto::find() |
|
|
|
->with('user', 'etablissement', 'pointVente','commandeAutoProduit') |
|
|
|
->where(['id_etablissement'=>Yii::$app->user->identity->id_etablissement]), |
|
|
|
->with(['user','etablissement', 'pointVente','commandeAutoProduit']) |
|
|
|
->joinWith(['user']) |
|
|
|
->where(['commande_auto.id_etablissement' => Yii::$app->user->identity->id_etablissement]) |
|
|
|
->orderBy('commande_auto.id_point_vente ASC, CASE `commande_auto`.`username` WHEN "" THEN `user`.`nom` ELSE `commande_auto`.`username` END ASC'), |
|
|
|
'pagination' => [ |
|
|
|
'pageSize' => 1000, |
|
|
|
], |