|
- <?php
-
-
-
- use yii\helpers\Html;
- use yii\grid\GridView;
- use common\models\User ;
- use common\models\Etablissement ;
-
- $this->title = 'Facturation';
- $this->params['breadcrumbs'][] = 'Administration' ;
- $this->params['breadcrumbs'][] = $this->title;
-
- ?>
-
- <h1>Facturation</h1>
-
- <?= GridView::widget([
- 'dataProvider' => $datas_factures,
- 'columns' => [
- [
- 'attribute' => 'reference',
- 'label' => 'Référence',
- ],
- [
- 'attribute' => 'id_producer',
- 'label' => 'Producteur',
- 'value' => function($model) {
- return Html::encode($model->producer->name) ;
- }
- ],
- 'libelle',
- [
- 'attribute' => 'amount_ht',
- 'label' => 'Montant',
- 'value' => function($model) {
- return number_format($model->amount_ht,2).' €' ;
- }
- ],
- [
- 'attribute' => 'paid',
- 'label' => 'Payé',
- 'format' => 'raw',
- 'value' => function($model) {
- if($model->paid)
- {
- return '<span class="label label-success">Oui</span>' ;
- }
- else {
- return '<span class="label label-danger">Non</span>' ;
- }
- }
- ]
- ],
- ]); ?>
|