Kaynağa Gözat

[backend] Documents : champs utilisateur, personnes morales en premier.

dev
Guillaume 4 yıl önce
ebeveyn
işleme
8d4d3a9272
2 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. +2
    -2
      backend/views/document/_form.php
  2. +2
    -2
      backend/views/point-sale/_form.php

+ 2
- 2
backend/views/document/_form.php Dosyayı Görüntüle

@@ -70,7 +70,7 @@ use common\models\Producer;
])->hiddenInput(); ?>
<?php else: ?>
<?php
$usersArray = User::findBy()->all();
$usersArray = User::findBy()->orderBy('type DESC')->all();
?>
<?= $form->field($model, 'id_user', [
'template' => '{label} <a href="' . Yii::$app->urlManager->createUrl(['user/create']) . '" class="btn btn-xs btn-default">Nouvel utilisateur <span class="glyphicon glyphicon-plus"></span></a><div>{input}</div>{hint}',
@@ -78,7 +78,7 @@ use common\models\Producer;
->dropDownList(
ArrayHelper::map($usersArray, 'user_id', function ($model) {
if(isset($model['name_legal_person']) && strlen($model['name_legal_person'])) {
return $model['name_legal_person'] ;
return 'Personne morale / '.$model['name_legal_person'] ;
}
else {
return $model['lastname'] . ' ' . $model['name'];

+ 2
- 2
backend/views/point-sale/_form.php Dosyayı Görüntüle

@@ -59,9 +59,9 @@ use common\models\Producer;
'template' => '{label} <a href="' . Yii::$app->urlManager->createUrl(['user/create']) . '" class="btn btn-xs btn-default">Nouvel utilisateur <span class="glyphicon glyphicon-plus"></span></a><div>{input}</div>{hint}',
])
->dropDownList(
ArrayHelper::map(User::findBy()->all(), 'user_id', function ($model) {
ArrayHelper::map(User::findBy()->orderBy('type DESC')->all(), 'user_id', function ($model) {
if(strlen($model['name_legal_person'])) {
return $model['name_legal_person'] ;
return 'Personne morale / '.$model['name_legal_person'] ;
}
else {
return $model['lastname'] . ' ' . $model['name'];

Yükleniyor…
İptal
Kaydet