fix some problems with ordering packages on alt. locations, #23189, #940
authorMark Wells <mark@freeside.biz>
Wed, 29 May 2013 00:18:46 +0000 (17:18 -0700)
committerMark Wells <mark@freeside.biz>
Wed, 29 May 2013 00:18:46 +0000 (17:18 -0700)
httemplate/edit/process/quick-cust_pkg.cgi
httemplate/elements/location.html

index 14dbda1..fe5ee5e 100644 (file)
@@ -160,6 +160,8 @@ if ( $quotationnum ) {
           ('custnum', FS::cust_main->location_fields)
     });
     $opt{'cust_location'} = $cust_location;
+  } else {
+    $opt{'locationnum'} = $locationnum;
   }
 
   $error = $cust_main->order_pkg( \%opt );
index 6855233..41a67a0 100644 (file)
@@ -219,8 +219,7 @@ Example:
   </TD>
 </TR>
 % }
-% if ( $conf->config('tax_district_method') ) {
-%   if ( $opt{enable_district} ) {
+% if ( $opt{enable_district} and $conf->config('tax_district_method') ) {
   <TR>
     <TD ALIGN="right">Tax&nbsp;district</TD>
     <TD COLSPAN=8>
@@ -231,9 +230,8 @@ Example:
     <% '(automatic)' %>
     </TD>
   </TR>
-%   } else {
+% } else {
     <INPUT TYPE="hidden" ID="<%$pre%>" NAME="<%$pre%>district" VALUE="<% $object->district %>">
-%   }
 % }
 
 %# For address standardization: