Some additional fixes related to last big committment
[fa-stable.git] / sales / view / view_invoice.php
index b6da97d4373497a03fede71d1e11a848eefc1891..c15753b6c2678c80396e32f6cde34d788ba28a0f 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)
@@ -120,7 +121,7 @@ if (db_num_rows($result) > 0)
            } 
            else 
            {
-                       $display_discount = percent_format2($myrow2["discount_percent"]*100) . "%";
+                       $display_discount = percent_format($myrow2["discount_percent"]*100) . "%";
            }
 
            label_cell($myrow2["stock_id"]);