+ Fix bug on currency in calculator
This commit is contained in:
parent
58d3b47dc3
commit
d9d0426ada
|
@ -11,7 +11,7 @@ use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
|||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Math\RoundingMode;
|
||||
use Brick\Money\Money;
|
||||
|
||||
$context = new \Brick\Money\Context\AutoContext();
|
||||
extract($_POST);
|
||||
|
||||
//$showResult = false;
|
||||
|
@ -383,14 +383,14 @@ $converter = new CurrencyConverter($provider);
|
|||
<div class="login-box-body">
|
||||
<div class="row">
|
||||
<?php
|
||||
$money = Money::of(@$montant, @$d->currency_code);
|
||||
$money2 = Money::of(round(@$montant - @$frais - @$taxe, 0), @$d->currency_code);
|
||||
$money3 = Money::of(round(@$montant - @$frais - @$taxe, 0), @$d->currency_code);
|
||||
$moneyTaxe = Money::of(round(@$taxe, 0), @$d->currency_code);
|
||||
$money = Money::of(round(@$montant,2), @$d->currency_code,$context);
|
||||
$money2 = Money::of(round(@$montant - @$frais - @$taxe, 2), @$d->currency_code,$context);
|
||||
$money3 = Money::of(round(@$montant - @$frais - @$taxe, 2), @$d->currency_code,$context);
|
||||
$moneyTaxe = Money::of(round(@$taxe, 2), @$d->currency_code,$context);
|
||||
$money2 = $converter->convert($money2, @$f->currency_code, RoundingMode::DOWN);
|
||||
$money3 = $converter->convert($money3, @$d->currency_code, RoundingMode::DOWN);
|
||||
$moneyFrais = Money::of(round(@$frais, 0), @$d->currency_code);
|
||||
$moneyTotalTaxe = Money::of(round(@$frais + @$taxe, 0), @$d->currency_code);
|
||||
$moneyFrais = Money::of(round(@$frais, 2), @$d->currency_code,$context);
|
||||
$moneyTotalTaxe = Money::of(round(@$frais + @$taxe, 2), @$d->currency_code,$context);
|
||||
?>
|
||||
<div class="col-lg-6 col-md-6">
|
||||
<div>
|
||||
|
|
|
@ -166,6 +166,11 @@ use Brick\Money\Money;
|
|||
$destinataire = ($row->id_destinataire ? $row->id_destinataire.' | ' : '').($row->nom_destinataire ? $row->nom_destinataire : '').(' '.$row->prenom_destinataire? $row->prenom_destinataire : '');
|
||||
|
||||
}
|
||||
if($row->user_phone){
|
||||
$emetteur = $row->user_phone.' | '.$row->user;
|
||||
}else{
|
||||
$emetteur = ($row->nom_emetteur? $row->nom_emetteur : '').(' '.$row->prenom_emetteur ? $row->prenom_emetteur : '');
|
||||
}
|
||||
$moneyNetFinal =Money::of(round($row->montant_net_final_country,2),$row->final_currency ? $row->final_currency : 'XAF',$context);
|
||||
echo "<tr>
|
||||
<td align='center' >$row->id_transaction</td>
|
||||
|
@ -183,7 +188,7 @@ use Brick\Money\Money;
|
|||
<td>".Money::of(round($row->commission_sup ? $row->commission_sup : 0 , 2),$row->init_currency,$context)->formatTo('fr_FR')."</td>
|
||||
<td>".Money::of(round($row->commission_ag ? $row->commission_ag : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')."</td>
|
||||
<td>".$row->agent."</td>
|
||||
<td>".$row->user_phone.' | '.$row->user."</td>
|
||||
<td>".$emetteur."</td>
|
||||
<td>".$destinataire."</td>
|
||||
<td>".toLocateDate($row->date,$this->session->userdata('timezone'))."</td>";
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue