X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fview%2Fcust_main%2Fbilling.html;h=c8d0c47cd0600e33ab4410b2873844911e332e20;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=b73270c6c61936f263017ba4f2c905c40b6b7f1c;hpb=f3c4bc88460be7576d81b9ca234b421950f48c01;p=freeside.git diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index b73270c6c..c8d0c47cd 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -1,15 +1,17 @@ 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) +% ) { (Bill now) % } <% ntable("#cccccc") %><% ntable("#cccccc",2) %> -% + %( my $balance = $cust_main->balance ) % =~ s/^(\-?)(.*)$/$1<\/FONT>$money_char$2/; -% - Balance due @@ -67,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)' %> @@ -80,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"; @@ -148,11 +159,24 @@ Billing information % } - +% my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups'); - Tax exempt + Tax exempt<% @exempt_groups ? ' (all taxes)' : '' %> <% $cust_main->tax ? 'yes' : 'no' %> +% foreach my $exempt_group ( @exempt_groups ) { + + Tax exempt (<% $exempt_group %> taxes) + <% $cust_main->tax_exemption($exempt_group) ? 'yes' : 'no' %> + +% } + +% if ( $conf->exists('enable_taxproducts') ) { + + Tax location + <% $cust_main->geocode('cch') %> + +% } Postal invoices @@ -185,7 +209,34 @@ Billing information % } +% if ( $conf->exists('voip-cust_cdr_squelch') ) { + + Print CDRs + <% $cust_main->squelch_cdr ? 'no' : 'yes' %> + +% } + +% if ( $conf->exists('voip-cust_email_csv_cdr') ) { + + Email CDRs as CSV + <% $cust_main->email_csv_cdr ? 'yes' : 'no' %> + +% } + +% if ( $show_term || $cust_main->cdr_termination_percentage ) { + + CDR termination settlement + <% $cust_main->cdr_termination_percentage %><% $cust_main->cdr_termination_percentage =~ /\d/ ? '%' : '' %> + +% } + +<%once> + +my $paystate_label = FS::Msgcat::_gettext('paystate'); +$paystate_label = 'Bank state' if $paystate_label =~/^paystate$/; + + <%init> my( $cust_main ) = @_; @@ -193,4 +244,10 @@ my @invoicing_list = $cust_main->invoicing_list; my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; +#false laziness w/edit/cust_main/billing.html +my $term_sql = "SELECT COUNT(*) FROM cust_pkg LEFT JOIN part_pkg USING ( pkgpart ) WHERE custnum = ? AND plan = 'cdr_termination' LIMIT 1"; +my $term_sth = dbh->prepare($term_sql) or die dbh->errstr; +$term_sth->execute($cust_main->custnum) or die $term_sth->errstr; +my $show_term = $term_sth->fetchrow_arrayref->[0]; +