diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 630caaff..7635c282 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -1,5 +1,7 @@ input->get('show')) { $this->show_config_infos($this->input->get('show')); }else { + $context = new CustomContext(2); $data["commission"] = ""; $data["principal"] = ""; @@ -413,7 +416,7 @@ class Hyperviseur_dash extends CI_Controller array_push($data['transactions'], $trans); } } - $data["totalCommissionBanque"] = Money::of(round($totalCommissionBanque,0), $this->session->userdata('currency_code'), new AutoContext() )->formatTo('fr_FR'); + $data["totalCommissionBanque"] = Money::of(round($totalCommissionBanque,2), $this->session->userdata('currency_code'), $context )->formatTo('fr_FR'); } @@ -425,8 +428,8 @@ class Hyperviseur_dash extends CI_Controller } $row = $res->first_row(); - $data["commission"] = Money::of(round($row->balance_com,0), $this->session->userdata('currency_code'),new AutoContext())->formatTo('fr_FR'); - $data["principal"] = Money::of(round($row->balance_princ,0), $this->session->userdata('currency_code'),new AutoContext())->formatTo('fr_FR'); + $data["commission"] = Money::of(round($row->balance_com,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR'); + $data["principal"] = Money::of(round($row->balance_princ,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR'); $data['wallet_id'] = $row->wallet_id; $data['curreny_code'] = $this->session->userdata('currency_code'); diff --git a/application/models/User_model.php b/application/models/User_model.php index 5a8876bd..f3d723fa 100755 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -2499,7 +2499,7 @@ class User_model extends CI_Model public function getPayingNetworksByConfigWallet($id_config){ $query = $this->db->query("SELECT n.name , n.id , cw.type , c.name as country ,c.currency_code, pw.taux_partage as rate , pw.balance_com FROM networks n INNER JOIN countries_currencies c ON n.country_id=c.id - INNER JOIN configWallet cw ON cw.id_network = n.id INNER JOIN paying_networks pw ON pw.id_network = n.id WHERE n.id IN ( SELECT id_network FROM paying_networks pw WHERE id_configWallet = $id_config )"); + INNER JOIN configWallet cw ON cw.id_network = n.id INNER JOIN paying_networks pw ON pw.id_network = n.id WHERE pw.id_configWallet = $id_config "); if($query->num_rows()>0){ return $query; }else{ diff --git a/application/views/gestion_wallet_autre.php b/application/views/gestion_wallet_autre.php index 3b172d20..45fc165e 100755 --- a/application/views/gestion_wallet_autre.php +++ b/application/views/gestion_wallet_autre.php @@ -8,8 +8,10 @@
lang->line('Solde Commission') ?>
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions |
---|
Min (FCFA) | -Max (FCFA) | +Min | +Max | lang->line('rate') ; ?> (%) | Actions | - = Money::of(round($row->balance_com, 0),$row->currency_code ? $row->currency_code : 'XAF',new AutoContext())->formatTo('fr_FR')?> + = Money::of(round($row->balance_com,2 ),$row->currency_code ? $row->currency_code : 'XAF',$context)->formatTo('fr_FR')?> | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$row->id | @@ -164,12 +165,12 @@ use Brick\Money\Money;".join(" ", str_split($row->numero_carte, 4))." | ".$moneyNetInit->formatTo('fr_FR')." | ".$moneyNetFinal->formatTo('fr_FR')." | -".Money::of(round($row->frais,0), $row->init_currency,new AutoContext())->formatTo('fr_FR')." | -".Money::of(round($row->taxe, 0),$row->init_currency,new AutoContext())->formatTo('fr_FR')." | -".Money::of(round($row->commission_banque ? $row->commission_banque : 0, 0),$row->init_currency,new AutoContext())->formatTo('fr_FR')." | -".Money::of(round($row->commission_hyp ? $row->commission_hyp : 0, 0),$row->init_currency,new AutoContext())->formatTo('fr_FR')." | -".Money::of(round($row->commission_sup ? $row->commission_sup : 0 , 0),$row->init_currency,new AutoContext())->formatTo('fr_FR')." | -".Money::of(round($row->commission_ag ? $row->commission_ag : 0, 0),$row->init_currency,new AutoContext())->formatTo('fr_FR')." | +".Money::of(round($row->frais,2), $row->init_currency,$context)->formatTo('fr_FR')." | +".Money::of(round($row->taxe, 2),$row->init_currency,$context)->formatTo('fr_FR')." | +".Money::of(round($row->commission_banque ? $row->commission_banque : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')." | +".Money::of(round($row->commission_hyp ? $row->commission_hyp : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')." | +".Money::of(round($row->commission_sup ? $row->commission_sup : 0 , 2),$row->init_currency,$context)->formatTo('fr_FR')." | +".Money::of(round($row->commission_ag ? $row->commission_ag : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')." | ".$row->agent." | ".$row->user." | ".toLocateDate($row->date,$this->session->userdata('timezone'))." | ";