Display tax info in Sales Quotation, Order, Direct Delivery and Invoice.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 5 Nov 2009 00:12:26 +0000 (00:12 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 5 Nov 2009 00:12:26 +0000 (00:12 +0000)
CHANGELOG.txt
sales/includes/ui/sales_order_ui.inc

index 34cf6aaadfb6a547db02bc695bbc8a69231d9aab..12f986c26b30be6c3f347c0e3b4fd0a651da1b48 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+05-Nov-2009 Joe Hunt
+! Display tax info in Sales Quotation, Order, Direct Delivery and Invoice.
+$ /sales/includes/ui/sales_order_ui.inc
+
 04-Nov-2009 Tom Hallman/Joe Hunt
 ! Included dimension(s) in Bank Deposit/Payment View and correct signs.
 $ /gl/view/gl_deposit_view.php
index 5ec8dfcb1d22a06769c527efd1f46ba6196f0fe0..52cfaa41e886e89cee800daed8c5a40b042b8e82 100644 (file)
@@ -217,9 +217,23 @@ function display_order_summary($title, &$order, $editable_items=false)
        if ($id==-1 && $editable_items)
                sales_order_item_controls($order, $k);
 
+/*
        $display_total = price_format($total);
        label_row(_("Total Excluding Shipping"), $display_total, "colspan=6 align=right",
                "nowrap align=right", 2);
+*/
+       $colspan = 6;
+       small_amount_row(_("Shipping Charge"), 'freight_cost', price_format(get_post('freight_cost',0)), "colspan=$colspan align=right");
+       $display_sub_total = price_format($total + input_num('freight_cost'));
+
+       label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right");
+
+       $taxes = $order->get_taxes(input_num('freight_cost'));
+       $tax_total = display_edit_tax_items($taxes, $colspan, $order->tax_included);
+
+       $display_total = price_format(($total + input_num('freight_cost') + $tax_total));
+
+       label_row(_("Amount Total"), $display_total, "colspan=$colspan align=right","align=right");
 
        end_table();
        if ($has_marked) {
@@ -589,18 +603,15 @@ function display_delivery_details(&$order)
 
                textarea_row(_("Address:"), 'delivery_address', $order->delivery_address, 35, 5,
                        _('Delivery address. Default is address of customer branch'));
-               text_row(_("Contact Phone Number:"), 'phone', $order->phone, 25, 25,
-                   _('Phone number of ordering person. Defaults to branch phone number'));
 
                table_section(2);
 
+               text_row(_("Contact Phone Number:"), 'phone', $order->phone, 25, 25,
+                   _('Phone number of ordering person. Defaults to branch phone number'));
                text_row(_("Customer Reference:"), 'cust_ref', $order->cust_ref, 25, 25,
                  _('Customer reference number for this order (if any)'));
                textarea_row(_("Comments:"), "Comments", $order->Comments, 31, 5);
 
-               small_amount_row(_("Shipping Charge:"), 'freight_cost',
-               price_format(get_post('freight_cost',0)));
-
                shippers_list_row(_("Shipping Company:"), 'ship_via', $order->ship_via);
 
                end_outer_table(1);