diff options
author | Mitch Jackson <mitch@freeside.biz> | 2018-11-08 14:12:13 -0500 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2018-11-08 14:15:06 -0500 |
commit | ed0ad0478f55b4adfd1bfd22445dbc02807a5c8a (patch) | |
tree | 3f30cff207f83b7d24e97297e6b6d049297c2b97 /FS/FS | |
parent | c93b76cc3c1ca489825eb876cd5e2863e9a1dd62 (diff) |
RT# 81608 Improved error msg for Bill Now
Update Bill Now to throw an appropriate error
message to user if they try to use Bill Now
on a customer with pending package expiration
Diffstat (limited to 'FS/FS')
-rw-r--r-- | FS/FS/cust_main.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index fb4b153..cc0e83f 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -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 |