! -> 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
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();
$_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);
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');
}
$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();
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();
$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));