context->getProducerCurrent(); $this->setTitle('Crédit : ' . number_format($creditUser, 2) . ' €'); $this->setPageTitle('Crédit'); if ($this->context->getProducerCurrent()->online_payment) { $this->addButton( [ 'label' => ' Créditer mon compte', 'url' => 'credit/add', 'class' => 'btn btn-primary' ] ); } ?> $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' => '- Débit', 'format' => 'raw', 'value' => function ($model) use ($paymentManager) { if ($paymentManager->isTypeDebit($model)) { return '- ' . $paymentManager->getAmount($model, true); } return ''; } ], [ 'label' => '+ Crédit', 'format' => 'raw', 'value' => function ($model) use ($paymentManager) { if ($paymentManager->isTypeCredit($model)) { return '+ ' . $paymentManager->getAmount($model, true); } return ''; } ], ], ]); ?>