X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=cc0e83f2341c1efdafc5a91b18afb166c4b2fafe;hb=ed0ad0478f55b4adfd1bfd22445dbc02807a5c8a;hp=2e8fe8159516f2cd8264c0d514ab4339c7068959;hpb=829aa888318799d2ff4871c92b0d457abda49714;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 2e8fe8159..cc0e83f23 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2064,7 +2064,7 @@ Returns a list: an empty list on success or a list of errors. sub unsuspend { my $self = shift; - grep { ($_->get('setup')) && $_->unsuspend } $self->suspended_pkgs; + grep { ($_->get('setup')) && $_->unsuspend } $self->suspended_pkgs(@_); } =item release_hold @@ -5429,7 +5429,13 @@ sub process_bill_and_collect { $param->{'fatal'} = 1; # runs from job queue, will be caught $param->{'retry'} = 1; - $cust_main->bill_and_collect( %$param ); + local $@; + eval { $cust_main->bill_and_collect( %$param) }; + if ( $@ ) { + die $@ =~ /cancel_pkgs cannot be run inside a transaction/ + ? "Bill Now unavailable for customer with pending package expiration\n" + : $@; + } } =item pending_invoice_count