Added rounding when needed to avoid document inconsistency
[fa-stable.git] / sales / view / view_dispatch.php
index 8a4460c0ee154029c03b07cd6027225d478fa32f..20ecb619d60ab7feea10c34af63a100dd519357d 100644 (file)
@@ -111,7 +111,8 @@ if (db_num_rows($result) > 0)
                if($myrow2['quantity']==0) continue;
                alt_table_row_color($k);
 
-               $value = ((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]);
+               $value = round(((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]), 
+                  user_price_dec());
                $sub_total += $value;
 
            if ($myrow2["discount_percent"] == 0)