From f6036d1338eb1df0fa5c58d358e52d770a7e0330 Mon Sep 17 00:00:00 2001 From: levinse Date: Tue, 10 May 2011 02:47:35 +0000 Subject: [PATCH] Fix UI issues in accountcode billing implementation, RT12181 --- FS/FS/cust_bill.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 1f6af40b4..0ba6cdfed 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -4151,7 +4151,6 @@ sub _items_accountcode_cdr { 'description' => 'Usage by Account Code', 'post_total' => '', 'summarized' => '', - 'total_generator' => sub { '' }, 'header' => '', }; my @lines; @@ -4188,6 +4187,7 @@ sub _items_accountcode_cdr { ext_description => [], }; + $section->{'amount'} += $amount; $accountcodes{$accountcode}{'amount'} += $amount; $accountcodes{$accountcode}{calls}++; $accountcodes{$accountcode}{duration} += $detail->duration; @@ -4202,7 +4202,9 @@ sub _items_accountcode_cdr { push @lines, $l; } - return ($section,\@lines); + my @sorted_lines = sort { $a->{'description'} <=> $b->{'description'} } @lines; + + return ($section,\@sorted_lines); } sub _items_svc_phone_sections { -- 2.11.0