[freeside-commits] branch master updated. ed0ad0478f55b4adfd1bfd22445dbc02807a5c8a
Mitch Jackson
mitch at freeside.biz
Thu Nov 8 11:16:52 PST 2018
The branch, master has been updated
via ed0ad0478f55b4adfd1bfd22445dbc02807a5c8a (commit)
from c93b76cc3c1ca489825eb876cd5e2863e9a1dd62 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ed0ad0478f55b4adfd1bfd22445dbc02807a5c8a
Author: Mitch Jackson <mitch at freeside.biz>
Date: Thu Nov 8 14:12:13 2018 -0500
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
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index fb4b153b2..cc0e83f23 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
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main.pm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list