Browse Source

[Backend] Formulaire créditer utilisateur : correction bug débit

master
keun 6 years ago
parent
commit
067e6f3ad1
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      backend/controllers/UserController.php

+ 1
- 5
backend/controllers/UserController.php View File

$credit_historique->id_user = $user->id; $credit_historique->id_user = $user->id;
$credit_historique->id_user_action = Yii::$app->user->identity->id; $credit_historique->id_user_action = Yii::$app->user->identity->id;
$credit_historique->id_etablissement = Yii::$app->user->identity->id_etablissement; $credit_historique->id_etablissement = Yii::$app->user->identity->id_etablissement;
if ($credit_historique->type == CreditHistorique::TYPE_DEBIT && $credit_historique->montant > 0)
$credit_historique->montant = - $credit_historique->montant;

$credit_historique->save(); $credit_historique->save();

$this->redirect(['user/index']);
$credit_historique = new CreditHistorique;
} }


$historique = CreditHistorique::find() $historique = CreditHistorique::find()

Loading…
Cancel
Save