projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 37817 - Updated to set condition to check for invoice sending action
[freeside.git]
/
FS
/
FS
/
cust_main.pm
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
2e8fe81
..
cc0e83f
100644
(file)
--- 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;
sub unsuspend {
my $self = shift;
- grep { ($_->get('setup')) && $_->unsuspend } $self->suspended_pkgs;
+ grep { ($_->get('setup')) && $_->unsuspend } $self->suspended_pkgs
(@_)
;
}
=item release_hold
}
=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;
$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
}
=item pending_invoice_count