next; # unlinked object; nothing else we can do
}
- my %to = {};
- if ($to) { $to{'to'} = $to; }
+ my %to = ( to => $to ) if $to;
if ( $msg_template ) {
# Now supports other context objects.
}
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)