|
- <?php
-
-
-
- use yii\helpers\Html;
-
- $this->setTitle('Crédit : <span id="credit-user">'.number_format($creditUser, 2).' €</span>');
- $this->setPageTitle('Crédit');
-
- if($this->context->getProducer()->online_payment) {
- $this->addButton(['label' => '<span class="glyphicon glyphicon-credit-card"></span> Créditer mon compte', 'url' => 'credit/add', 'class' => 'btn btn-primary']) ;
- }
-
- ?>
-
- <?= GridView::widget([
-
- 'dataProvider' => $dataProvider,
- 'columns' => [
- [
- 'attribute' => 'date',
- 'value' => function($model) {
- return $model->getDate(true) ;
- }
- ],
- [
- 'attribute' => 'id_user_action',
- 'value' => function($model) {
- return $model->strUserAction() ;
- }
- ],
- [
- 'label' => 'Type',
- 'format' => 'raw',
- 'value' => function($model) {
- return $model->getStrWording() ;
- }
- ],
- [
- 'attribute' => 'mean_payment',
- 'value' => function($model) {
- return $model->getStrMeanPayment() ;
-
- }
- ],
- [
- 'label' => '- Débit',
- 'format' => 'raw',
- 'value' => function($model) {
- if($model->isTypeDebit()) {
- return '- '.$model->getAmount(true) ;
- }
- return '' ;
- }
- ],
- [
- 'label' => '+ Crédit',
- 'format' => 'raw',
- 'value' => function($model) {
- if($model->isTypeCredit()) {
- return '+ '.$model->getAmount(true) ;
- }
- return '' ;
- }
- ],
- ],
- ]);
- ?>
|