getPaymentManager(); $producerManager = $this->getProducerManager(); $userManager = $this->getUserManager(); $this->setTitle('Créditer '.Html::encode($user->lastname.' '.$user->name).'', 'Créditer '.Html::encode($user->lastname.' '.$user->name)) ; $this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]) ; $this->addBreadcrumb(['label' => Html::encode($user->lastname.' '.$user->name)]) ; $this->addBreadcrumb('Créditer') ; ?>
findOneProducerById(GlobalParam::getCurrentProducerId()); if(!$producer->credit) { echo '
Attention, la fonctionnalité Crédit est désactivée dans vos paramètres.' . ' Pensez à l\'activer si vous souhaitez qu\'elle soit visible de vos utilisateurs.
' ; } ?>

Crédit obligatoire credit_active ? 'Désactiver' : 'Activer', ['user/state-credit', 'idUser' => $user->id,'state' => !$userProducer->credit_active], ['class' => 'btn btn-default btn-xs']); ?>

credit_active): ?>
Activé
Désactivé

Crédit / débit

field($creditForm, 'type')->dropDownList([ Payment::TYPE_CREDIT => 'Crédit', Payment::TYPE_DEBIT => 'Débit', ]) ?> field($creditForm, 'amount')->textInput() ?> field($creditForm, 'mean_payment')->dropDownList([ MeanPayment::MONEY => MeanPayment::getStrBy(MeanPayment::MONEY), MeanPayment::CREDIT_CARD => MeanPayment::getStrBy(MeanPayment::CREDIT_CARD), MeanPayment::CHEQUE => MeanPayment::getStrBy(MeanPayment::CHEQUE), MeanPayment::TRANSFER => MeanPayment::getStrBy(MeanPayment::TRANSFER), MeanPayment::OTHER => MeanPayment::getStrBy(MeanPayment::OTHER), ]) ?> field($creditForm, 'comment')->textarea() ?> field($creditForm, 'send_mail')->checkbox() ?>
'btn btn-primary']) ?>

Historique getCredit($user), 2); ?> €

$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 ''; } ], [ 'label' => 'Commentaire', 'format' => 'raw', 'value' => function ($model) { return nl2br($model->comment); } ], ], ]); ?>