|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
$dataProvider = new ActiveDataProvider([ |
|
|
$dataProvider = new ActiveDataProvider([ |
|
|
'query' => CommandeAuto::find() |
|
|
'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' => [ |
|
|
'pagination' => [ |
|
|
'pageSize' => 1000, |
|
|
'pageSize' => 1000, |
|
|
], |
|
|
], |