X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fdetail_format%2Fsum_count.pm;h=253956f0d6d6ec64ea3db629de1558f27e597c62;hp=c40fcb8fe97daed30e3f4090cce231f1b93afc83;hb=5773eb8d8b4168213482a7e61aa37e0dd05c69da;hpb=488d3c15c9aaea2a17826600ee332f0af9b0634d diff --git a/FS/FS/detail_format/sum_count.pm b/FS/FS/detail_format/sum_count.pm index c40fcb8fe..253956f0d 100644 --- a/FS/FS/detail_format/sum_count.pm +++ b/FS/FS/detail_format/sum_count.pm @@ -24,6 +24,7 @@ sub header_detail { sub append { my $self = shift; my $svcnums = ($self->{svcnums} ||= {}); + my $acctids = $self->{acctids} ||= []; foreach my $cdr (@_) { my $object = $self->{inbound} ? $cdr->cdr_termination(1) : $cdr; my $svcnum = $object->svcnum; # yes, $object->svcnum. @@ -33,6 +34,8 @@ sub append { $subtotal->{count}++; $subtotal->{amount} += $object->rated_price if $object->freesidestatus ne 'no-charge'; + + push @$acctids, $cdr->acctid; } } @@ -68,6 +71,7 @@ sub finish { startdate => '', #could use the earliest startdate in the bunch? regionname => '', #no, we're using prefix instead detail => $self->csv->string, + acctid => $self->{acctids}, }); } #foreach $svcnum