+ Fix bug on currency in calculator v2

This commit is contained in:
Djery-Tom 2020-07-03 18:29:38 +01:00
parent d9d0426ada
commit d9cf56359e
1 changed files with 7 additions and 7 deletions

View File

@ -446,9 +446,9 @@ $converter = new CurrencyConverter($provider);
</div> </div>
<?php if(isset($montant_retrait)) { <?php if(isset($montant_retrait)) {
$currency = @$d->currency_code ? @$d->currency_code : 'XAF'; $currency = @$d->currency_code ? @$d->currency_code : 'XAF';
$moneyMontantRetrait = Money::of(round(@$montant_retrait, 0),$currency); $moneyMontantRetrait = Money::of(round(@$montant_retrait, 2),$currency,$context);
$moneyInit = Money::of(round(@$montant_init, 0),$currency); $moneyInit = Money::of(round(@$montant_init, 2),$currency,$context);
$moneyFraisRetrait = Money::of(round(@$frais_retrait, 0),$currency); $moneyFraisRetrait = Money::of(round(@$frais_retrait, 2),$currency,$context);
?> ?>
<div class="row" style="margin-top: 15px"> <div class="row" style="margin-top: 15px">
<div class="col-lg-4"> <div class="col-lg-4">
@ -469,10 +469,10 @@ $converter = new CurrencyConverter($provider);
<div class="row"> <div class="row">
<?php <?php
$currency = @$d->currency_code ? @$d->currency_code : 'XAF'; $currency = @$d->currency_code ? @$d->currency_code : 'XAF';
$moneyComAg = Money::of(round(@$com_ag, 0),$currency); $moneyComAg = Money::of(round(@$com_ag, 2),$currency,$context);
$moneyComSup = Money::of(round(@$com_sup, 0),$currency); $moneyComSup = Money::of(round(@$com_sup, 2),$currency,$context);
$moneyComHyp = Money::of(round(@$com_hyp, 0),$currency); $moneyComHyp = Money::of(round(@$com_hyp, 2),$currency,$context);
$moneyComBq = Money::of(round(@$com_bq, 0),$currency); $moneyComBq = Money::of(round(@$com_bq, 2),$currency,$context);
?> ?>
<div class="col-lg-3 col-md-6"> <div class="col-lg-3 col-md-6">
<div> <div>