echeck: add optional bank branch format, RT13360
[freeside.git] / httemplate / view / cust_main / billing.html
index c8d0c47..662bc9b 100644 (file)
@@ -5,7 +5,12 @@ Billing information
 %if (  $FS::CurrentUser::CurrentUser->access_right('Bill customer now')
 %      && ! $cust_main->is_encrypted($cust_main->payinfo)
 %   ) { 
-  (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>)
+%#  (<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>)
+  (<% include('/elements/bill.html',
+                custnum   => $cust_main->custnum,
+                label     => 'Bill now',
+                url       => $p.'view/cust_main.cgi?'.$cust_main->custnum,
+  ) %>)
 % } 
 
 <% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
@@ -18,6 +23,15 @@ Billing information
   <TD BGCOLOR="#ffffff"><B><% $balance %></B></TD>
 </TR>
 
+% if ( $conf->exists('cust_main-select-billday') 
+%    && ($cust_main->payby eq 'CARD' || $cust_main->payby eq 'CHEK') ) {
+<TR>
+  <TD ALIGN="right">Billing day of month</TD>
+  <TD BGCOLOR="#ffffff"><% $cust_main->billday %>
+  </TD>
+</TR>
+% }
+
 <TR>
   <TD ALIGN="right">Billing&nbsp;type</TD>
   <TD BGCOLOR="#ffffff">
@@ -70,6 +84,8 @@ Billing information
 </TR>
 % } elsif ( $cust_main->payby eq 'CHEK' || $cust_main->payby eq 'DCHK') {
 %     my( $account, $aba ) = split('@', $cust_main->paymask );
+%  my $branch = '';
+%  ($branch,$aba) = split('\.',$aba) if $conf->exists('cust_main-require-bank-branch');
 
 
     Electronic&nbsp;check&nbsp;<% $cust_main->payby eq 'CHEK' ? '(automatic)' : '(on-demand)' %>
@@ -79,6 +95,14 @@ Billing information
   <TD ALIGN="right">ABA/Routing code</TD>
   <TD BGCOLOR="#ffffff"><% $aba %></TD>
 </TR>
+
+% if ( $conf->exists('cust_main-require-bank-branch') ) {
+<TR>
+  <TD ALIGN="right">Branch number</TD>
+  <TD BGCOLOR="#ffffff"><% $branch %></TD>
+ <TR>
+% }
+
 <TR>
   <TD ALIGN="right">Account number</TD>
   <TD BGCOLOR="#ffffff"><% $account %></TD>
@@ -127,7 +151,7 @@ Billing information
 
 <TR>
   <TD ALIGN="right">Attention</TD>
-  <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD>
+  <TD BGCOLOR="#ffffff"><% $cust_main->payname |h %></TD>
 </TR>
 % } elsif ( $cust_main->payby eq 'COMP' ) { 
 
@@ -189,18 +213,28 @@ Billing information
     <% ( grep { $_ eq 'FAX' } @invoicing_list ) ? 'yes' : 'no' %>
   </TD>
 </TR>
+% unless ( $conf->exists('cust-email-high-visibility')) {
 <TR>
   <TD ALIGN="right">Email&nbsp;invoices</TD>
   <TD BGCOLOR="#ffffff">
     <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %>
   </TD>
 </TR>
+% }
 <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>
+<TR>
+  <TD ALIGN="right">Credit&nbsp;limit</TD>
+  <TD BGCOLOR="#ffffff">
+    <% length($cust_main->credit_limit) ? 
+        $money_char.sprintf("%.2f", $cust_main->credit_limit) :
+        'Unlimited' %>
+  </TD>
+</TR>
 
 % if ( $conf->exists('voip-cust_cdr_spools') ) { 
   <TR>