From: Jonathan Prykop Date: Thu, 17 Mar 2016 05:16:35 +0000 (-0500) Subject: RT#28648: Unsuspend when past due balance is paid [v3 merge] X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=6b7eaf2053e63569f1d8475fc16d603fa3995646;p=freeside.git RT#28648: Unsuspend when past due balance is paid [v3 merge] --- diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index 05881b98c..e6fa75715 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -156,6 +156,11 @@ If you need to continue using the old Form 477 report, turn on the $conf->set('password-generated-characters', $pw_set); } + if ($conf->exists('unsuspendauto') && !$conf->config('unsuspend_balance')) { + $conf->set('unsuspend_balance','Zero'); + $conf->delete('unsuspendauto'); + } + } sub upgrade_overlimit_groups { diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index bea4c0260..7b71eb246 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -532,12 +532,14 @@ sub suspended_pkgs { grep { $_->susp } $self->ncancelled_pkgs; } -=item unflagged_suspended_pkgs - -Returns all unflagged suspended packages (see L) for this -customer (thouse packages without the `manual_flag' set). - -=cut +### This appears to be unused, will be going away +# +#=item unflagged_suspended_pkgs +# +#Returns all unflagged suspended packages (see L) for this +#customer (thouse packages without the `manual_flag' set). +# +#=cut sub unflagged_suspended_pkgs { my $self = shift; diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 93906df55..587454eb9 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -1242,15 +1242,6 @@ sub _upgrade_data { #class method process_upgrade_paybatch(); } } - - # unsuspendauto upgrade - # could just as easily go in cust_credit, or even cust_bill or cust_main - # but here works - if ($conf->exists('unsuspendauto') && !$conf->config('unsuspend_balance')) { - $conf->set('unsuspend_balance','Zero'); - $conf->delete('unsuspendauto'); - } - } sub process_upgrade_paybatch { diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index b1373849f..a4c5447f6 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -189,11 +189,6 @@ date order taker (see L) -=item manual_flag - -If this field is set to 1, disables the automatic -unsuspension of this package when using the B config option. - =item quantity If not set, defaults to 1