context->getProducer();
$this->setTitle('Crédit : ' . number_format($creditUser, 2) . ' €');
$this->setPageTitle('Crédit');
if ($this->context->getProducer()->online_payment) {
$this->addButton(
[
'label' => ' Créditer mon compte',
'url' => 'credit/add',
'class' => 'btn btn-primary'
]
);
}
?>
= GridView::widget([
// 'filterModel' => $searchModel,
'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 '';
}
],
],
]);
?>