|
|
@@ -54,7 +54,11 @@ use common\helpers\GlobalParam ; |
|
|
|
<?php endif; ?> |
|
|
|
<div class="col-md-5" id="bloc-select-user"> |
|
|
|
<?= $form->field($model, 'id_user')->dropDownList( ArrayHelper::map(User::find()->joinWith('userProducer')->where('user_producer.id_producer = '.GlobalParam::getCurrentProducerId())->andWhere('user_producer.active = 1')->orderBy('lastname ASC, name ASC')->all(), 'id', function($model, $defaultValue) { |
|
|
|
return $model['lastname'].' '.$model['name']; |
|
|
|
if (isset($model['name_legal_person']) && strlen($model['name_legal_person'])) { |
|
|
|
return 'Personne morale / '.$model['name_legal_person']; |
|
|
|
} else { |
|
|
|
return $model['lastname'] . ' ' . $model['name']; |
|
|
|
} |
|
|
|
}), ['prompt' => '--','class' => 'form-control user-id', ]) ?> |
|
|
|
</div> |
|
|
|
<div class="col-md-1" id="or-user"> |