|
|
|
|
|
|
|
|
'format' => 'raw', |
|
|
'format' => 'raw', |
|
|
'value' => function($model) use($etablissement) { |
|
|
'value' => function($model) use($etablissement) { |
|
|
if(!isset($model['credit'])) $model['credit'] = 0 ; |
|
|
if(!isset($model['credit'])) $model['credit'] = 0 ; |
|
|
|
|
|
$user = User::findOne($model['user_id']) ; |
|
|
$html = '<div class="input-group"> |
|
|
$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"> |
|
|
<span class="input-group-btn"> |
|
|
'.Html::a( |
|
|
'.Html::a( |
|
|
'<span class="glyphicon glyphicon-euro"></span> Crédit', |
|
|
'<span class="glyphicon glyphicon-euro"></span> Crédit', |