-%
-% 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) ) {
<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";
<% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %>
</TD>
</TR>
-% if ( $conf->exists('voip-cust_cdr_spools') ) {
+<TR>
+ <TD ALIGN="right">Invoice 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 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>