summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main/Billing.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-09-16 21:38:07 -0700
committerMark Wells <mark@freeside.biz>2014-09-16 21:38:15 -0700
commit7a486dea647f735a9a1d0381443218ad6affe6e1 (patch)
tree33fffd4cfdf1288767ba61da6ee58c358daaa76a /FS/FS/cust_main/Billing.pm
parent43da86c4a7fab275a941650abb11173f4f2930aa (diff)
improve unsuspend behavior for packages on hold, #28508
Diffstat (limited to 'FS/FS/cust_main/Billing.pm')
-rw-r--r--FS/FS/cust_main/Billing.pm16
1 files changed, 11 insertions, 5 deletions
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index d55cb2f..29f7e8e 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -1090,6 +1090,16 @@ sub _make_lines {
my %setup_param = ( 'discounts' => \@setup_discounts );
my $setup_billed_currency = '';
my $setup_billed_amount = 0;
+ # Conditions for setting setup date and charging the setup fee:
+ # - this is not a recurring-only billing run
+ # - and the package is not currently being canceled
+ # - and, unless we're specifically told otherwise via 'resetup':
+ # - it doesn't already HAVE a setup date
+ # - or a start date in the future
+ # - and it's not suspended
+ #
+ # The last condition used to check the "disable_setup_suspended" option but
+ # that's obsolete. We now never set the setup date on a suspended package.
if ( ! $options{recurring_only}
and ! $options{cancel}
and ( $options{'resetup'}
@@ -1097,11 +1107,7 @@ sub _make_lines {
&& ( ! $cust_pkg->start_date
|| $cust_pkg->start_date <= $cmp_time
)
- && ( ! $conf->exists('disable_setup_suspended_pkgs')
- || ( $conf->exists('disable_setup_suspended_pkgs') &&
- ! $cust_pkg->getfield('susp')
- )
- )
+ && ( ! $cust_pkg->getfield('susp') )
)
)
)