fix dispatch rounding version 1

This commit is contained in:
fappels 2015-09-10 22:16:03 +02:00
parent 1d85529eda
commit a294700cef

View File

@ -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)
{