From 7e31c8f38f221b3a8bb78b319467f0cd5adae57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20L=C3=A9onard?= Date: Mon, 7 Dec 2015 01:27:08 +0100 Subject: [PATCH] Fix decimals in payments of supplier invoices --- htdocs/fourn/class/paiementfourn.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 98876ab2519..5326bbde85e 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -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);