fix: round in commission calculation

This commit is contained in:
Djery-Tom 2023-10-11 12:41:14 +01:00
parent 4540d05eec
commit 0f51769a75
1 changed files with 2 additions and 2 deletions

View File

@ -2378,7 +2378,7 @@ class iLinkTransactionController extends Controller
$frais += $fees;
$taxe = $this->calculateTax($init_country != $final_country ? $taxesInternationales : $taxesNationales, $frais);
$data['frais'] = round($frais + $taxe, 2);
$data['montant_net_init'] = $request->montant + $data['frais'];
$data['montant_net_init'] = round($request->montant + $data['frais'],2);
$data['exchange_rate'] = $this->getExchangeRate($init_country, $final_country);
$data['montant_net_final'] = $this->toMoneyWithCurrency(round($request->montant, 2), $init_country, $final_country);
break;
@ -2397,7 +2397,7 @@ class iLinkTransactionController extends Controller
$frais += $fees;
$taxe = $this->calculateTax($init_country != $final_country ? $taxesInternationales : $taxesNationales, $frais);
$data['frais'] = round($frais + $taxe, 2);
$data['montant_net_init'] = $request->montant + $data['frais'];
$data['montant_net_init'] = round($request->montant + $data['frais'], 2);
$data['exchange_rate'] = $this->getExchangeRate($init_country, $final_country);
$data['montant_net_final'] = $this->toMoneyWithCurrency(round($request->montant, 2), $init_country, $final_country);
break;