- $display_total = price_format($total);
- label_row(_("Total Excluding Shipping/Tax"), $display_total, "colspan=6 align=right",
- "nowrap align=right");
+ $colspan = count($th)-2;
+ if (count($order->line_items))
+ $colspan--;
+
+ $display_sub_total = price_format($total);
+
+ label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right", 2);
+
+ $taxes = $order->get_taxes();
+
+ $tax_total = display_edit_tax_items($taxes, $colspan, $order->tax_included, 2, $order->trans_type==ST_SUPPINVOICE);
+
+ $display_total = price_format(($total + $tax_total));
+
+ start_row();
+ label_cells(_("Amount Total"), $display_total, "colspan=$colspan align='right'","align='right'");
+ $order->trans_type == ST_SUPPINVOICE
+ ? submit_cells('update', _("Update"), "colspan=2 align='center'", _("Refresh"), true)
+ : label_cell('', "colspan=2");
+ end_row();