From: Joe Hunt Date: Fri, 6 Nov 2009 11:01:43 +0000 (+0000) Subject: Improved layout in the new tax info display. Also old ones. X-Git-Tag: v2.4.2~19^2~1044 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=0e88af6d26c95a93f08635cb33fb5085cce1cc97;p=fa-stable.git Improved layout in the new tax info display. Also old ones. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index af386e36..92724354 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,14 @@ Legend: ! -> Note $ -> Affected files +06-Nov-2009 Joe Hunt +! Improved layout in the new tax info display. Also old ones. +$ /sales/credit_invoice.php + /sales/customer_delivery.php + /sales/customer_invoice.php + /sales/includes/ui/sales_credit_ui.inc + /sales/includes/ui/sales_order_ui.inc + 05-Nov-2009 Joe Hunt ! Display tax info in Sales Quotation, Order, Direct Delivery and Invoice. $ /sales/includes/ui/sales_order_ui.inc diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index 77ef7336..5d6a3dbd 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -321,24 +321,24 @@ function display_credit_items() if (!check_num('ChargeFreightCost')) { $_POST['ChargeFreightCost'] = price_format($_SESSION['Items']->freight_cost); } - + $colspan = 7; start_row(); - label_cell(_("Credit Shipping Cost"), "colspan=7 align=right"); - amount_cells_ex(null, "ChargeFreightCost", 6, 8, $_POST['ChargeFreightCost']); + label_cell(_("Credit Shipping Cost"), "colspan=$colspan align=right"); + small_amount_cells(null, "ChargeFreightCost", price_format(get_post('ChargeFreightCost',0))); end_row(); $inv_items_total = $_SESSION['Items']->get_items_total_dispatch(); $display_sub_total = price_format($inv_items_total + input_num($_POST['ChargeFreightCost'])); - label_row(_("Sub-total"), $display_sub_total, "colspan=7 align=right", "align=right"); + label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right", "align=right"); $taxes = $_SESSION['Items']->get_taxes(input_num($_POST['ChargeFreightCost'])); - $tax_total = display_edit_tax_items($taxes, 7, $_SESSION['Items']->tax_included); + $tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['Items']->tax_included); $display_total = price_format(($inv_items_total + input_num('ChargeFreightCost') + $tax_total)); - label_row(_("Credit Note Total"), $display_total, "colspan=7 align=right", "align=right"); + label_row(_("Credit Note Total"), $display_total, "colspan=$colspan align=right", "align=right"); end_table(); div_end(); diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index f41b058d..74595a99 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -448,22 +448,25 @@ foreach ($_SESSION['Items']->line_items as $line=>$ln_itm) { $_POST['ChargeFreightCost'] = get_post('ChargeFreightCost', price_format($_SESSION['Items']->freight_cost)); -start_row(); +$colspan = 9; -small_amount_cells(_("Shipping Cost"), 'ChargeFreightCost', $_SESSION['Items']->freight_cost, "colspan=9 align=right"); +start_row(); +label_cell(_("Shipping Cost"), "colspan=$colspan align=right"); +small_amount_cells(null, 'ChargeFreightCost', $_SESSION['Items']->freight_cost); +end_row(); $inv_items_total = $_SESSION['Items']->get_items_total_dispatch(); $display_sub_total = price_format($inv_items_total + input_num('ChargeFreightCost')); -label_row(_("Sub-total"), $display_sub_total, "colspan=9 align=right","align=right"); +label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right"); $taxes = $_SESSION['Items']->get_taxes(input_num('ChargeFreightCost')); -$tax_total = display_edit_tax_items($taxes, 9, $_SESSION['Items']->tax_included); +$tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['Items']->tax_included); $display_total = price_format(($inv_items_total + input_num('ChargeFreightCost') + $tax_total)); -label_row(_("Amount Total"), $display_total, "colspan=9 align=right","align=right"); +label_row(_("Amount Total"), $display_total, "colspan=$colspan align=right","align=right"); end_table(1); diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index d9196b37..10e9d7d7 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -488,9 +488,10 @@ $accumulate_shipping = get_company_pref('accumulate_shipping'); if ($is_batch_invoice && $accumulate_shipping) set_delivery_shipping_sum(array_keys($_SESSION['Items']->src_docs)); +$colspan = 9; start_row(); - -small_amount_cells(_("Shipping Cost"), 'ChargeFreightCost', null, "colspan=9 align=right"); +label_cell(_("Shipping Cost"), "colspan=$colspan align=right"); +small_amount_cells(null, 'ChargeFreightCost', null); if ($is_batch_invoice) { label_cell('', 'colspan=2'); } @@ -500,14 +501,14 @@ $inv_items_total = $_SESSION['Items']->get_items_total_dispatch(); $display_sub_total = price_format($inv_items_total + input_num('ChargeFreightCost')); -label_row(_("Sub-total"), $display_sub_total, "colspan=9 align=right","align=right", $is_batch_invoice ? 2 : 0); +label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right", $is_batch_invoice ? 2 : 0); $taxes = $_SESSION['Items']->get_taxes(input_num('ChargeFreightCost')); -$tax_total = display_edit_tax_items($taxes, 9, $_SESSION['Items']->tax_included, $is_batch_invoice ? 2:0); +$tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['Items']->tax_included, $is_batch_invoice ? 2:0); $display_total = price_format(($inv_items_total + input_num('ChargeFreightCost') + $tax_total)); -label_row(_("Invoice Total"), $display_total, "colspan=9 align=right","align=right", $is_batch_invoice ? 2 : 0); +label_row(_("Invoice Total"), $display_total, "colspan=$colspan align=right","align=right", $is_batch_invoice ? 2 : 0); end_table(1); div_end(); diff --git a/sales/includes/ui/sales_credit_ui.inc b/sales/includes/ui/sales_credit_ui.inc index 73a5894f..6f281c6f 100644 --- a/sales/includes/ui/sales_credit_ui.inc +++ b/sales/includes/ui/sales_credit_ui.inc @@ -212,22 +212,25 @@ function display_credit_items($title, &$order) if ($id==-1) credit_edit_item_controls($order, $k); + $colspan = 6; $display_sub_total = price_format($subtotal); - label_row(_("Sub-total"), $display_sub_total, "colspan=6 align=right", "align=right", 2); + label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right", "align=right", 2); if (!isset($_POST['ChargeFreightCost']) OR ($_POST['ChargeFreightCost'] == "")) - $_POST['ChargeFreightCost'] = price_format(0); - - amount_cells_ex(_("Shipping"), 'ChargeFreightCost', 8, 8, $_POST['ChargeFreightCost'], "colspan=6 align=right"); + $_POST['ChargeFreightCost'] = 0; + start_row(); + label_cell(_("Shipping"), "colspan=$colspan align=right"); + small_amount_cells(null, 'ChargeFreightCost', price_format(get_post('ChargeFreightCost',0))); label_cell('', 'colspan=2'); + end_row(); $taxes = $order->get_taxes($_POST['ChargeFreightCost']); - $tax_total = display_edit_tax_items($taxes, 6, $order->tax_included); + $tax_total = display_edit_tax_items($taxes, $colspan, $order->tax_included, 2); $display_total = price_format(($subtotal + $_POST['ChargeFreightCost'] + $tax_total)); - label_row(_("Credit Note Total"), $display_total, "colspan=6 align=right","class='amount'", 2); + label_row(_("Credit Note Total"), $display_total, "colspan=$colspan align=right","class='amount'", 2); end_table(); div_end(); diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index acf06310..028ca8b7 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -220,13 +220,17 @@ function display_order_summary($title, &$order, $editable_items=false) $colspan = 6; if ($order->trans_no!=0) ++$colspan; - small_amount_row(_("Shipping Charge"), 'freight_cost', price_format(get_post('freight_cost',0)), "colspan=$colspan align=right"); + start_row(); + label_cell(_("Shipping Charge"), "colspan=$colspan align=right"); + small_amount_cells(null, 'freight_cost', price_format(get_post('freight_cost',0))); + label_cell('', 'colspan=2'); + end_row(); $display_sub_total = price_format($total + input_num('freight_cost')); - label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right"); + label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right", 2); $taxes = $order->get_taxes(input_num('freight_cost')); - $tax_total = display_edit_tax_items($taxes, $colspan, $order->tax_included); + $tax_total = display_edit_tax_items($taxes, $colspan, $order->tax_included, 2); $display_total = price_format(($total + input_num('freight_cost') + $tax_total));