getChecker();
$producer = $this->context->getProducerCurrent();
$this->setTitle('Cagnotte
' . number_format($creditUser, 2, ',', ' ') . ' €
');
$this->setPageTitle('Cagnotte');
if ($featureChecker->isEnabled(Feature::ALIAS_ONLINE_PAYMENT) && $this->context->getProducerCurrent()->online_payment) {
$this->addButton(
[
'label' => ' Créditer ma cagnotte',
'url' => 'credit/add',
'class' => 'btn btn-primary'
]
);
}
?>
getSolver()->getConfig('option_credit_description');
if($creditDescription): ?>
= nl2br(Html::encode($creditDescription)); ?>
= GridView::widget([
'summary' => '',
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'date',
'value' => function ($model) use ($paymentManager) {
return $paymentManager->getDate($model, true);
}
],
/*[
'attribute' => 'id_user_action',
'value' => function ($model) use ($paymentManager) {
return $paymentManager->getStrUserAction($model);
}
],*/
[
'label' => 'Type',
'format' => 'raw',
'value' => function ($model) use ($paymentManager) {
return $paymentManager->getStrWording($model);
}
],
[
'attribute' => 'mean_payment',
'value' => function ($model) use ($paymentManager) {
return $paymentManager->getStrMeanPayment($model);
}
],
[
'label' => 'Montant',
'format' => 'raw',
'value' => function ($model) use ($paymentManager) {
if ($paymentManager->isTypeDebit($model)) {
return '- ' . $paymentManager->getAmount($model, true);
}
elseif($paymentManager->isTypeCredit($model)) {
return '+ ' . $paymentManager->getAmount($model, true).'';
}
return '';
}
],
],
]);
?>