ticket 1568 config options for new echeck fields and addition to selfservice interface
[freeside.git] / httemplate / view / cust_main / billing.html
index 1f80dc5..3fcb5d4 100644 (file)
@@ -1,11 +1,3 @@
-%
-%  my( $cust_main ) = @_;
-%  my @invoicing_list = $cust_main->invoicing_list;
-%  my $conf = new FS::Conf;
-%  my $money_char = $conf->config('money_char') || '$';
-%
-
-
 Billing information
 %  # If we can't see the unencrypted card, then bill now is an exercise in frustration 
 %if ( ! $cust_main->is_encrypted($cust_main->payinfo) ) { 
@@ -91,9 +83,19 @@ Billing information
   <TD BGCOLOR="#ffffff"><% 'x'x(length($account)-2). substr($account,(length($account)-2)) %></TD>
 </TR>
 <TR>
+  <TD ALIGN="right">Account type</TD>
+  <TD BGCOLOR="#ffffff"><% $cust_main->paytype %></TD>
+</TR>
+<TR>
   <TD ALIGN="right">Bank name</TD>
   <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD>
 </TR>
+% if ( $conf->exists('show_bankstate') ) {
+<TR>
+  <TD ALIGN="right"><% $paystate_label %></TD>
+  <TD BGCOLOR="#ffffff"><% $cust_main->paystate || '&nbsp;&nbsp;&nbsp;' %></TD>
+</TR>
+% }
 % } elsif ( $cust_main->payby eq 'LECB' ) {
 %     $cust_main->payinfo =~ /^(\d{3})(\d{3})(\d{4})$/;
 %     my $payinfo = "$1-$2-$3";
@@ -179,14 +181,30 @@ Billing information
     <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %>
   </TD>
 </TR>
-% if ( $conf->exists('voip-cust_cdr_spools') ) { 
+<TR>
+  <TD ALIGN="right">Invoice&nbsp;terms</TD>
+  <TD BGCOLOR="#ffffff">
+    <% $cust_main->invoice_terms || 'Default ('. ( $conf->config('invoice_default_terms') || 'Payable upon receipt' ). ')' %>
+  </TD>
+</TR>
 
+% if ( $conf->exists('voip-cust_cdr_spools') ) { 
   <TR>
     <TD ALIGN="right">Spool&nbsp;CDRs</TD>
     <TD BGCOLOR="#ffffff"><% $cust_main->spool_cdr ? 'yes' : 'no' %></TD>
   </TR>
 % } 
 
-
 </TABLE></TD></TR></TABLE>
-
+<%once>
+
+my $paystate_label = FS::Msgcat::_gettext('paystate');
+$paystate_label = 'Bank state' if $paystate_label =~/^paystate$/;
+
+</%once>
+<%init>
+my( $cust_main ) = @_;
+my @invoicing_list = $cust_main->invoicing_list;
+my $conf = new FS::Conf;
+my $money_char = $conf->config('money_char') || '$';
+</%init>