[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.108.2.1, 1.108.2.2
Erik Levinson
levinse at wavetail.420.am
Fri Jan 14 12:08:20 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv7021/FS/FS/part_pkg
Modified Files:
Tag: FREESIDE_2_1_BRANCH
voip_cdr.pm
Log Message:
make CDR invoice details appear chronologically on invoices, for voip_cdr, RT10960
Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.108.2.1
retrieving revision 1.108.2.2
diff -u -w -d -r1.108.2.1 -r1.108.2.2
--- voip_cdr.pm 24 Dec 2010 09:49:50 -0000 1.108.2.1
+++ voip_cdr.pm 14 Jan 2011 20:08:18 -0000 1.108.2.2
@@ -385,6 +385,8 @@
); # $last_bill, $$sdate )
$options{'by_svcnum'} = 1 if $svc_field eq 'svcnum';
+ my @invoice_details_sort;
+
foreach my $cdr (
$svc_x->get_cdrs( %options )
) {
@@ -743,7 +745,7 @@
warn " adding details on charge to invoice: [ ".
join(', ', @{$call_details} ). " ]"
if ( $DEBUG && ref($call_details) );
- push @$details, $call_details; #\@call_details,
+ push @invoice_details_sort, [ $call_details, $cdr->calldate_unix ];
}
# if the customer flag is on, call "downstream_csv" or something
@@ -762,6 +764,11 @@
} # $cdr
+ my @sorted_invoice_details = sort { @{$a}[1] <=> @{$b}[1] } @invoice_details_sort;
+ foreach my $sorted_call_detail ( @sorted_invoice_details ) {
+ push @$details, @{$sorted_call_detail}[0];
+ }
+
} # $cust_svc
unshift @$details, [ 'C',
More information about the freeside-commits
mailing list