fix postal mail checkbox misbehaving (isn't sticky on errors - reverts back to on)
authorivan <ivan>
Fri, 9 Dec 2005 16:56:53 +0000 (16:56 +0000)
committerivan <ivan>
Fri, 9 Dec 2005 16:56:53 +0000 (16:56 +0000)
httemplate/edit/cust_main.cgi
httemplate/edit/cust_main/billing.html

index e10c85f..144d540 100755 (executable)
@@ -234,7 +234,10 @@ Service address
 
 <!-- billing info -->
 
-<%= include('cust_main/billing.html', $cust_main ) %>
+<%= include( 'cust_main/billing.html', $cust_main,
+               'invoicing_list' => \@invoicing_list,
+           )
+%>
 
 <SCRIPT>
 function bottomfixup(what) {
index 1f557c8..a9b3c1f 100644 (file)
@@ -1,6 +1,7 @@
 <%
 
-my( $cust_main ) = @_;
+my( $cust_main, %options ) = @_;
+my @invoicing_list = @{ $options{'invoicing_list'} };
 my $conf = new FS::Conf;
 my $payby_default = $conf->config('payby-default');
 
@@ -49,14 +50,12 @@ if ( $payby_default eq 'HIDE' ) {
 
   <INPUT TYPE="hidden" NAME="tax" VALUE="<%= $cust_main->tax %>">
 
-  <INPUT TYPE="hidden" NAME="invoicing_list" VALUE="<%= join(', ', $cust_main->invoicing_list) %>">
+  <INPUT TYPE="hidden" NAME="invoicing_list" VALUE="<%= join(', ', @invoicing_list) %>">
 
   </FORM>
 
 <% } else {
 
-  my @invoicing_list = $cust_main->invoicing_list;
-
   my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
 
 %>