projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
31b17a0
)
modify invoice DID summary date range calculation, RT10886
author
levinse
<levinse>
Sun, 24 Apr 2011 05:07:19 +0000
(
05:07
+0000)
committer
levinse
<levinse>
Sun, 24 Apr 2011 05:07:19 +0000
(
05:07
+0000)
FS/FS/cust_bill.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
6a72862
..
5d38512
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-2866,7
+2866,7
@@
sub print_generic {
}
}
}
}
-
+
if ( @pr_cust_bill && !$conf->exists('disable_previous_balance') ) {
push @buf, ['','-----------'];
push @buf, [ 'Total Previous Balance',
if ( @pr_cust_bill && !$conf->exists('disable_previous_balance') ) {
push @buf, ['','-----------'];
push @buf, [ 'Total Previous Balance',
@@
-2879,7
+2879,7
@@
sub print_generic {
if $DEBUG > 1;
my ($didsummary,$minutes) = $self->_did_summary;
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 ],
push @detail_items,
{ 'description' => $didsummary_desc,
'ext_description' => [ $didsummary, $minutes ],
@@
-3697,7
+3697,7
@@
sub _items_sections {
}
} @sections;
push @early, @$extra_sections if $extra_sections;
}
} @sections;
push @early, @$extra_sections if $extra_sections;
-
+
sort { $a->{sort_weight} <=> $b->{sort_weight} } @early;
}
sort { $a->{sort_weight} <=> $b->{sort_weight} } @early;
}
@@
-4062,7
+4062,10
@@
sub _items_extra_usage_sections {
sub _did_summary {
my $self = shift;
my $end = $self->_date;
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)
my $cust_main = $self->cust_main;
my @pkgs = $cust_main->all_pkgs;
my($num_activated,$num_deactivated,$num_portedin,$num_portedout,$minutes)