[freeside-commits] branch FREESIDE_3_BRANCH updated. 06cb92dc485e9f46de39307f971907bfdef119a3
Mark Wells
mark at 420.am
Thu Apr 23 11:54:35 PDT 2015
The branch, FREESIDE_3_BRANCH has been updated
via 06cb92dc485e9f46de39307f971907bfdef119a3 (commit)
from 97566b78dd87ce4f0cda7885d7ca40414b2e69c3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 06cb92dc485e9f46de39307f971907bfdef119a3
Author: Mark Wells <mark at freeside.biz>
Date: Thu Apr 23 11:51:17 2015 -0700
calculate current day consistently for sync_bill_date + prorate_round_day, #34622
diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm
index 5fd2696..2201384 100644
--- a/FS/FS/part_pkg/flat.pm
+++ b/FS/FS/part_pkg/flat.pm
@@ -171,6 +171,12 @@ sub cutoff_day {
if ( $self->option('sync_bill_date',1) ) {
my $next_bill = $cust_pkg->cust_main->next_bill_date;
if ( defined($next_bill) ) {
+ # careful here. if the prorate calculation is going to round to
+ # the nearest day, this needs to always return the same result
+ if ( $self->option('prorate_round_day', 1) ) {
+ my $hour = (localtime($next_bill))[2];
+ $next_bill += 64800 if $hour >= 12;
+ }
return (localtime($next_bill))[3];
}
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg/flat.pm | 6 ++++++
1 file changed, 6 insertions(+)
More information about the freeside-commits
mailing list