Added possibility to put dimensions on Delivery from sales order
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 3 Sep 2010 07:42:01 +0000 (07:42 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 3 Sep 2010 07:42:01 +0000 (07:42 +0000)
CHANGELOG.txt
sales/customer_invoice.php

index 3f38802f1c979b3499aa7d4ace2561a9c7bcb186..c433887729a0fa87a1d6889a41284ee9314c7527 100644 (file)
@@ -22,6 +22,7 @@ $ -> Affected files
 03-"3p-2010 Joe Hunt
 + Added possibility to put dimensions on Delivery from sales order
 $ /sales/customer_delivery.php
+  /sales/customer_invoice.php
 ! Changed update.html to be more readable
 $ update.html
 
index fbffe054897a1675e3d7fff3e3f11adbacf6db0c..d3a9e9374f4a84a5fcb59bcc0c0f0df0c138b240 100644 (file)
@@ -362,9 +362,17 @@ hidden('cart_id');
 start_table(TABLESTYLE2, "width=80%", 5);
 
 start_row();
+$colspan = 1;
+$dim = get_company_pref('use_dimension');
+if ($dim > 0) 
+       $colspan = 3;
 label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'");
 label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'");
-label_cells(_("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'");
+if ($_SESSION['Items']->pos != -1) // editable payment type
+       label_cells(_("Payment terms:"), sale_payment_list('payment'), "class='tableheader2'", "colspan=$colspan");
+else
+       label_cells(_('Payment:'), $_SESSION['Items']->payment_terms['terms'], "class='tableheader2'", "colspan=$colspan");
+
 end_row();
 start_row();
 
@@ -379,10 +387,10 @@ if ($_SESSION['Items']->trans_no == 0) {
 
 label_cells(_("Sales Type"), $_SESSION['Items']->sales_type_name, "class='tableheader2'");
 
-if ($_SESSION['Items']->pos != -1) // editable payment type
-       label_cells(_("Payment terms:"), sale_payment_list('payment'), "class='tableheader2'");
-else
-       label_cells(_('Payment:'), $_SESSION['Items']->payment_terms['terms'], "class='tableheader2'");
+label_cells(_("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'");
+// 2010-09-03 Joe Hunt
+if ($dim > 0) 
+       label_cells(_("Dimension"), get_dimension_string($_SESSION['Items']->dimension_id), "class='tableheader2'");
 
 end_row();
 start_row();
@@ -408,6 +416,8 @@ if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) {
 }
 
 date_cells(_("Due Date"), 'due_date', '', null, 0, 0, 0, "class='tableheader2'");
+if ($dim > 1) 
+       label_cells(_("Dimension"). " 2", get_dimension_string($_SESSION['Items']->dimension2_id), "class='tableheader2'");
 
 end_row();
 end_table();