From a67fd3bbfeec137ebf494e36eaa920145b8509a1 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 1 Jul 2009 10:28:49 +0000 Subject: start of settlement CDR processing, RT#5495 --- httemplate/edit/cust_main/billing.html | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index f0d9b853a..4c4be23c0 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -427,18 +427,31 @@ spool_cdr eq "Y" ? 'CHECKED' : '' %>> Spool CDRs % } else { - -% } +% } % if ( $conf->exists('voip-cust_cdr_squelch') ) { squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from invoices % } else { - -% } +% } + + +% if ( $show_term || $cust_main->cdr_termination_percentage ) { + + CDR termination settlement + % + +% } else { + +% } @@ -464,4 +477,10 @@ my @payby = grep /\w/, $conf->config('payby'); @payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) unless @payby; +#false laziness w/view/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]; + -- cgit v1.2.1