Przeglądaj źródła

Corrections bugs crédit pain

master
keun 7 lat temu
rodzic
commit
09b39570d5
3 zmienionych plików z 4 dodań i 3 usunięć
  1. +1
    -1
      backend/controllers/UserController.php
  2. +1
    -1
      backend/views/user/credit.php
  3. +2
    -1
      backend/views/user/index.php

+ 1
- 1
backend/controllers/UserController.php Wyświetl plik

@@ -74,7 +74,7 @@ class UserController extends BackendController
]);
$etablissement = Etablissement::find()
->where(['id' => Yii::$app->user->identity->id])
->where(['id' => Yii::$app->user->identity->id_etablissement])
->one() ;
return $this->render('index', [

+ 1
- 1
backend/views/user/credit.php Wyświetl plik

@@ -16,7 +16,7 @@ $this->params['breadcrumbs'][] = 'Créditer';
<?php
$etablissement = Etablissement::find()
->where(['id' => Yii::$app->user->identity->id])
->where(['id' => Yii::$app->user->identity->id_etablissement])
->one() ;
if(!$etablissement->credit_pain)
{

+ 2
- 1
backend/views/user/index.php Wyświetl plik

@@ -113,8 +113,9 @@ $this->params['breadcrumbs'][] = $this->title;
'format' => 'raw',
'value' => function($model) use($etablissement) {
if(!isset($model['credit'])) $model['credit'] = 0 ;
$user = User::findOne($model['user_id']) ;
$html = '<div class="input-group">
<input type="text" class="form-control input-credit" readonly="readonly" value="'.number_format($model['credit'],2).' €" placeholder="">
<input type="text" class="form-control input-credit" readonly="readonly" value="'.number_format($user->getCredit($etablissement->id),2).' €" placeholder="">
<span class="input-group-btn">
'.Html::a(
'<span class="glyphicon glyphicon-euro"></span> Crédit',

Ładowanie…
Anuluj
Zapisz