From d800198db4f59bd5369e0d1acbfeb3c7594c32c0 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 30 Oct 2018 12:17:16 -0700 Subject: add option to limit automatic unsuspensions to a specific suspension reason type, RT#74448, RT#81634 --- FS/FS/cust_main_Mixin.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'FS/FS/cust_main_Mixin.pm') diff --git a/FS/FS/cust_main_Mixin.pm b/FS/FS/cust_main_Mixin.pm index cceaa4b..6a2e905 100644 --- a/FS/FS/cust_main_Mixin.pm +++ b/FS/FS/cust_main_Mixin.pm @@ -737,7 +737,9 @@ sub unsuspend_balance { } my $balance = $cust_main->balance || 0; if ($balance <= $maxbalance) { - my @errors = $cust_main->unsuspend; + my @errors = $cust_main->unsuspend( + 'reason_type' => $conf->config('unsuspend_reason_type') + ); # side-fx with nested transactions? upstack rolls back? warn "WARNING:Errors unsuspending customer ". $cust_main->custnum. ": ". join(' / ', @errors) -- cgit v1.1