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) ) {
+%# If we can't see the unencrypted card, then bill now is an exercise in
+%# frustration (without some sort of job queue magic to send it to a secure
+%# machine, anyway)
+%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>)
% }
<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
-%
+
%( my $balance = $cust_main->balance )
% =~ s/^(\-?)(.*)$/<FONT SIZE=+1>$1<\/FONT>$money_char$2/;
-%
-
<TR>
<TD ALIGN="right">Balance due</TD>
<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 || ' ' %></TD>
+</TR>
+% }
% } elsif ( $cust_main->payby eq 'LECB' ) {
% $cust_main->payinfo =~ /^(\d{3})(\d{3})(\d{4})$/;
% my $payinfo = "$1-$2-$3";
% }
</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 ) = @_;