You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 satır
1.3KB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. use common\models\User ;
  5. use common\models\Etablissement ;
  6. $this->title = 'Facturation';
  7. $this->params['breadcrumbs'][] = 'Administration' ;
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <h1>Facturation</h1>
  11. <?= GridView::widget([
  12. 'dataProvider' => $datas_factures,
  13. 'columns' => [
  14. [
  15. 'attribute' => 'reference',
  16. 'label' => 'Référence',
  17. ],
  18. [
  19. 'attribute' => 'id_etablissement',
  20. 'label' => 'Établissement',
  21. 'value' => function($model) {
  22. return Html::encode($model->etablissement->nom) ;
  23. }
  24. ],
  25. 'libelle',
  26. [
  27. 'attribute' => 'montant_ht',
  28. 'label' => 'Montant',
  29. 'value' => function($model) {
  30. return number_format($model->montant_ht,2).' €' ;
  31. }
  32. ],
  33. [
  34. 'attribute' => 'paye',
  35. 'label' => 'Payé',
  36. 'format' => 'raw',
  37. 'value' => function($model) {
  38. if($model->paye)
  39. {
  40. return '<span class="label label-success">Oui</span>' ;
  41. }
  42. else {
  43. return '<span class="label label-danger">Non</span>' ;
  44. }
  45. }
  46. ]
  47. ],
  48. ]); ?>