[freeside-commits] branch FREESIDE_3_BRANCH updated. a9c79371a9053340f704adecef9bcd84a78b311d
Ivan
ivan at 420.am
Wed Aug 30 17:06:48 PDT 2017
The branch, FREESIDE_3_BRANCH has been updated
via a9c79371a9053340f704adecef9bcd84a78b311d (commit)
from 007febab237932fb8235cb6cae89904b46e58aa6 (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 a9c79371a9053340f704adecef9bcd84a78b311d
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Aug 30 17:06:47 2017 -0700
fix prorate_day without force_prorate_day for recur_Common packages configured as subscription or prorate, RT#77140, RT#38191
diff --git a/FS/FS/part_pkg/recur_Common.pm b/FS/FS/part_pkg/recur_Common.pm
index 07355f6..0103b95 100644
--- a/FS/FS/part_pkg/recur_Common.pm
+++ b/FS/FS/part_pkg/recur_Common.pm
@@ -43,12 +43,17 @@ sub cutoff_day {
my $recur_method = $self->option('recur_method',1) || 'anniversary';
my $cust_main = $cust_pkg->cust_main;
- if ( $cust_main->force_prorate_day and $cust_main->prorate_day ) {
- return ( $cust_main->prorate_day );
- } elsif ($recur_method eq 'prorate' || $recur_method eq 'subscription') {
+ return ( $cust_main->prorate_day )
+ if $cust_main->prorate_day and ( $cust_main->force_prorate_day
+ || $recur_method eq 'prorate'
+ || $recur_method eq 'subscription'
+ );
- return split(/\s*,\s*/, $self->option('cutoff_day', 1) || '1');
- }
+ return split(/\s*,\s*/, $self->option('cutoff_day', 1) || '1')
+ if $recur_method eq 'prorate'
+ || $recur_method eq 'subscription';
+
+ return ();
}
sub calc_recur_Common {
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_pkg/recur_Common.pm | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list