Added rounding when needed to avoid document inconsistency
[fa-stable.git] / sales / view / view_credit.php
index 0ba000898ee19fd0bf02ee549352e2f8e1e85bce..ec14f0313f250e6d5356781cfdb42901ddd9e939 100644 (file)
@@ -90,7 +90,8 @@ if (db_num_rows($result) > 0)
 
                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)