Improved javascript allocations
[fa-stable.git] / sales / view / view_sales_order.php
index 32cd1b7440c28f33820f0bd93a05df4d80eefda8..13bebb09beec97d4fcb670a17d68c6bcfe8123c6 100644 (file)
@@ -90,7 +90,7 @@ while ($del_row = db_fetch($result))
 
 }
 
-label_row(null, number_format2($delivery_total,user_price_dec()), "", "colspan=4 align=right");
+label_row(null, price_format($delivery_total), "", "colspan=4 align=right");
 
 end_table();
 echo "</td><td valign='top'>";
@@ -123,7 +123,7 @@ while ($inv_row = db_fetch($result))
 
 }
 
-label_row(null, number_format2($invoices_total,user_price_dec()), "", "colspan=4 align=right");
+label_row(null, price_format($invoices_total), "", "colspan=4 align=right");
 
 end_table();
 
@@ -155,7 +155,7 @@ while ($credits_row = db_fetch($result))
 
 }
 
-label_row(null, "<font color=red>" . number_format2(-$credits_total,user_price_dec()) . "</font>",
+label_row(null, "<font color=red>" . price_format(-$credits_total) . "</font>",
        "", "colspan=4 align=right");
 
 
@@ -177,7 +177,8 @@ $k = 0;  //row colour counter
 
 foreach ($_SESSION['Items']->line_items as $stock_item) {
 
-       $line_total =   $stock_item->quantity * $stock_item->price * (1 - $stock_item->discount_percent);
+       $line_total = round($stock_item->quantity * $stock_item->price * (1 - $stock_item->discount_percent), 
+          user_price_dec());
 
        alt_table_row_color($k);
 
@@ -195,9 +196,9 @@ foreach ($_SESSION['Items']->line_items as $stock_item) {
 
 $items_total = $_SESSION['Items']->get_items_total();
 
-$display_total = number_format2($items_total + $_SESSION['Items']->freight_cost,user_price_dec());
+$display_total = price_format($items_total + $_SESSION['Items']->freight_cost);
 
-label_row(_("Shipping"), number_format2($_SESSION['Items']->freight_cost,user_price_dec()),
+label_row(_("Shipping"), price_format($_SESSION['Items']->freight_cost),
        "align=right colspan=6", "nowrap align=right");
 label_row(_("Total Order Value"), $display_total, "align=right colspan=6",
        "nowrap align=right");