This commit is contained in:
Laurent Destailleur 2020-08-23 18:49:19 +02:00
parent 477c3e719d
commit 815269db9c

View File

@ -548,7 +548,7 @@ class MultiCurrency extends CommonObject
* *
* @param int $fk_facture id of facture * @param int $fk_facture id of facture
* @param double $amount amount to convert * @param double $amount amount to convert
* @param string $way dolibarr mean the amount is in dolibarr currency * @param string $way 'dolibarr' mean the amount is in dolibarr currency
* @param string $table facture or facture_fourn * @param string $table facture or facture_fourn
* @return double amount converted * @return double amount converted
*/ */
@ -558,8 +558,8 @@ class MultiCurrency extends CommonObject
if ($multicurrency_tx) if ($multicurrency_tx)
{ {
if ($way == 'dolibarr') return $amount * $multicurrency_tx; if ($way == 'dolibarr') return price2num($amount * $multicurrency_tx, 'MU');
else return $amount / $multicurrency_tx; else return price2num($amount / $multicurrency_tx, 'MU');
} else return $amount; } else return $amount;
} }