|
|
@@ -84,8 +84,13 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
|
'headerOptions' => ['class' => 'actions'], |
|
|
|
'buttons' => [ |
|
|
|
'commandes' => function ($url, $model) { |
|
|
|
$url = Yii::$app->urlManager->createUrl(['user/commandes','id' => $model['id']]) ; |
|
|
|
$count_commandes = Commande::find()->joinWith('production')->where(['id_user' => $model['id'], 'production.id_etablissement' => Yii::$app->user->identity->id_etablissement])->count() ; |
|
|
|
$url = Yii::$app->urlManager->createUrl(['user/commandes','id' => $model['user_id']]) ; |
|
|
|
$count_commandes = Commande::find() |
|
|
|
->joinWith('production') |
|
|
|
->where([ |
|
|
|
'id_user' => $model['user_id'], |
|
|
|
'production.id_etablissement' => Yii::$app->user->identity->id_etablissement]) |
|
|
|
->count() ; |
|
|
|
$html = '' ; |
|
|
|
if($count_commandes) |
|
|
|
{ |