瀏覽代碼

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

master
keun 6 年之前
父節點
當前提交
067e6f3ad1
共有 1 個檔案被更改,包括 1 行新增5 行删除
  1. +1
    -5
      backend/controllers/UserController.php

+ 1
- 5
backend/controllers/UserController.php 查看文件

@@ -194,12 +194,8 @@ class UserController extends BackendController {
$credit_historique->id_user = $user->id;
$credit_historique->id_user_action = Yii::$app->user->identity->id;
$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();

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

$historique = CreditHistorique::find()

Loading…
取消
儲存