From a294700cef7e253e63723e83f68199e9c88571c7 Mon Sep 17 00:00:00 2001 From: fappels Date: Thu, 10 Sep 2015 22:16:03 +0200 Subject: [PATCH] fix dispatch rounding version 1 --- htdocs/fourn/commande/dispatch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index e62402feabb..76d09d8f3d3 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -266,7 +266,7 @@ if ($id > 0 || ! empty($ref)) { while ( $row = $db->fetch_row($resql) ) { - $products_dispatched[$row[0]] = $row[2]; + $products_dispatched[$row[0]] = price2num($row[2], 5); } $db->free($resql); } @@ -322,7 +322,7 @@ if ($id > 0 || ! empty($ref)) } else { - $remaintodispatch=($objp->qty - $products_dispatched[$objp->rowid]); // Calculation of dispatched + $remaintodispatch=(price2num($objp->qty, 5) - $products_dispatched[$objp->rowid]); // Calculation of dispatched if ($remaintodispatch < 0) $remaintodispatch=0; if ($remaintodispatch) {