From 7e9e7b187565d8168500d48e775d0e94b5374d35 Mon Sep 17 00:00:00 2001 From: levinse Date: Mon, 9 May 2011 20:07:31 +0000 Subject: [PATCH] fix UI bugs in accountcode billing implementation, RT12181 --- FS/FS/cust_bill.pm | 6 ++++-- httemplate/edit/cust_main/billing.html | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 3f94796c6..1f6af40b4 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2832,8 +2832,10 @@ sub print_generic { if ($conf->exists('voip-cust_accountcode_cdr') && $cust_main->accountcode_cdr) { my ($accountcode_section, $accountcode_lines) = $self->_items_accountcode_cdr($escape_function_nonbsp,$format); - push @{$late_sections}, $accountcode_section; - push @detail_items, @$accountcode_lines; + if ( scalar(@$accountcode_lines) ) { + push @{$late_sections}, $accountcode_section; + push @detail_items, @$accountcode_lines; + } } }else{ push @sections, { 'description' => '', 'subtotal' => '' }; diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 884d77078..532bfc721 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -461,19 +461,6 @@ -% if ( $conf->exists('voip-cust_accountcode_cdr') ) { - - - accountcode_cdr eq "Y" ? 'CHECKED' : '' %> - > Breakdown CDRs by accountcode - -% } else { - -% } - Credit limit @@ -511,6 +498,19 @@ function toggle(obj) { % } +% if ( $conf->exists('voip-cust_accountcode_cdr') ) { + + + accountcode_cdr eq "Y" ? 'CHECKED' : '' %> + > Breakdown CDRs by accountcode + +% } else { + +% } + % if ( $show_term || $cust_main->cdr_termination_percentage ) { CDR termination settlement -- 2.11.0