[freeside-commits] freeside/FS/FS cust_bill.pm,1.334,1.335
Erik Levinson
levinse at wavetail.420.am
Sat Apr 23 22:07:21 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv28071/FS/FS
Modified Files:
cust_bill.pm
Log Message:
modify invoice DID summary date range calculation, RT10886
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.334
retrieving revision 1.335
diff -u -w -d -r1.334 -r1.335
--- cust_bill.pm 14 Apr 2011 00:23:49 -0000 1.334
+++ cust_bill.pm 24 Apr 2011 05:07:19 -0000 1.335
@@ -2879,7 +2879,7 @@
if $DEBUG > 1;
my ($didsummary,$minutes) = $self->_did_summary;
- my $didsummary_desc = 'DID Activity Summary (Past 30 days)';
+ my $didsummary_desc = 'DID Activity Summary (since last invoice)';
push @detail_items,
{ 'description' => $didsummary_desc,
'ext_description' => [ $didsummary, $minutes ],
@@ -4062,7 +4062,10 @@
sub _did_summary {
my $self = shift;
my $end = $self->_date;
- my $start = $end - 2592000; # 30 days
+ my @cust_bill = sort { $a->_date <=> $b->_date }
+ grep { $_->_date < $self->_date }
+ qsearch( 'cust_bill', { 'custnum' => $self->custnum } );
+ my $start = $cust_bill[-1]->_date+1; # since last invoice
my $cust_main = $self->cust_main;
my @pkgs = $cust_main->all_pkgs;
my($num_activated,$num_deactivated,$num_portedin,$num_portedout,$minutes)
More information about the freeside-commits
mailing list