X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fbilling.html;h=aea90e8b32ee8df4936e85a07752b7e76d878228;hb=efc68f41987d007de5e792b88df1c63bf3dedf4c;hp=d1be8936fb5c2de82bea8fe750e5afa30aa8a697;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index d1be8936f..aea90e8b3 100644
--- a/httemplate/view/cust_main/billing.html
+++ b/httemplate/view/cust_main/billing.html
@@ -1,19 +1,17 @@
-%
-% my( $cust_main ) = @_;
-% my @invoicing_list = $cust_main->invoicing_list;
-% my $conf = new FS::Conf;
-% my $money_char = $conf->config('money_char') || '$';
-%
-
-
Billing information
-(Bill now)
+%# 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)
+% ) {
+ (Bill now)
+% }
+
<% ntable("#cccccc") %>
<% ntable("#cccccc",2) %>
-%
+
%( my $balance = $cust_main->balance )
% =~ s/^(\-?)(.*)$/$1<\/FONT>$money_char$2/;
-%
-
Balance due |
@@ -31,7 +29,7 @@ Billing information
Card number |
- <% $cust_main->payinfo_masked %> |
+ <% $cust_main->paymask %> |
%
%#false laziness w/elements/select-month_year.html & edit/cust_main/billing.html
@@ -71,8 +69,7 @@ Billing information
| <% $cust_main->payname %> |
% } elsif ( $cust_main->payby eq 'CHEK' || $cust_main->payby eq 'DCHK') {
-% my( $account, $aba ) = split('@', $cust_main->payinfo );
-%
+% my( $account, $aba ) = split('@', $cust_main->paymask );
Electronic check <% $cust_main->payby eq 'CHEK' ? '(automatic)' : '(on-demand)' %>
@@ -84,12 +81,22 @@ Billing information
Account number |
- <% 'x'x(length($account)-2). substr($account,(length($account)-2)) %> |
+ <% $account %> |
+
+
+ Account type |
+ <% $cust_main->paytype %> |
Bank name |
<% $cust_main->payname %> |
+% if ( $conf->exists('show_bankstate') ) {
+
+ <% $paystate_label %> |
+ <% $cust_main->paystate || ' ' %> |
+
+% }
% } elsif ( $cust_main->payby eq 'LECB' ) {
% $cust_main->payinfo =~ /^(\d{3})(\d{3})(\d{4})$/;
% my $payinfo = "$1-$2-$3";
@@ -175,14 +182,39 @@ Billing information
<% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %>
-% if ( $conf->exists('voip-cust_cdr_spools') ) {
+
+ Invoice terms |
+
+ <% $cust_main->invoice_terms || 'Default ('. ( $conf->config('invoice_default_terms') || 'Payable upon receipt' ). ')' %>
+ |
+
+% if ( $conf->exists('voip-cust_cdr_spools') ) {
Spool CDRs |
<% $cust_main->spool_cdr ? 'yes' : 'no' %> |
% }
+% if ( $conf->exists('voip-cust_cdr_squelch') ) {
+
+ Print CDRs |
+ <% $cust_main->squelch_cdr ? 'no' : 'yes' %> |
+
+% }
+<%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>