summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-06-03 10:17:01 -0700
committerIvan Kohler <ivan@freeside.biz>2013-06-03 10:17:01 -0700
commit46c68293e3e9a0bec7b7141b200708512199e0a8 (patch)
treebdedbd2d9adc4d81a9ddeb920d59671354a76172
parent39f23d982625e321123a60157b2e887519dc34ac (diff)
fix per-day radius usage, RT#22699
-rw-r--r--FS/FS/part_pkg/sqlradacct_daily.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/part_pkg/sqlradacct_daily.pm b/FS/FS/part_pkg/sqlradacct_daily.pm
index d0d3e1006..27fc1df3e 100644
--- a/FS/FS/part_pkg/sqlradacct_daily.pm
+++ b/FS/FS/part_pkg/sqlradacct_daily.pm
@@ -96,15 +96,15 @@ sub calc_recur {
# bill that day, we didn't have a full picture of the day's usage)
# and ending with sdate exclusive (same reason)
- my($l_day, $l_mon, $l_year) = (localtime($last_bill))[3,5];
+ my($l_day, $l_mon, $l_year) = (localtime($last_bill))[3..5];
my $day_start = timelocal(0,0,0, $l_day, $l_mon, $l_year);
- my($s_day, $s_mon, $s_year) = (localtime($$sdate))[3,5];
+ my($s_day, $s_mon, $s_year) = (localtime($$sdate))[3..5];
my $billday_start = timelocal(0,0,0, $s_day, $s_mon, $s_year);
while ( $day_start < $billday_start ) {
- my($day, $mon, $year) = (localtime($day_start))[3,5];
+ my($day, $mon, $year) = (localtime($day_start))[3..5];
my $tomorrow = timelocal_nocheck(0,0,0, $day+1, $mon, $year);
#afact the usage methods already use the lower bound inclusive and the upper