Merge pull request #4169 from openthink-laurent/fix-decimals-payments-supplier-invoices

Fix decimals in payments of supplier invoices
This commit is contained in:
Laurent Destailleur 2015-12-10 13:06:07 +01:00
commit 936116a6a0

View File

@ -128,10 +128,9 @@ class PaiementFourn extends Paiement
$this->total = 0;
foreach ($this->amounts as $key => $value)
{
$value = price2num($value);
$val = round($value, 2);
$this->amounts[$key] = $val;
$this->total += $val;
$newvalue = price2num($value, 'MT');
$this->amounts[$key] = $newvalue;
$this->total += $newvalue;
}
$this->total = price2num($this->total);