[freeside-commits] branch FREESIDE_4_BRANCH updated. 4f010c8c1b354eee79db1ff628eb2a1ef9274d2e

Ivan ivan at 420.am
Tue May 30 14:56:41 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  4f010c8c1b354eee79db1ff628eb2a1ef9274d2e (commit)
      from  b25b04ebba149ac5257a693fbcb555a46d379a0f (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 4f010c8c1b354eee79db1ff628eb2a1ef9274d2e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue May 30 14:56:40 2017 -0700

    error on batch insert is returned to user, not fatal, RT#75998

diff --git a/FS/FS/cust_main/Billing_Batch.pm b/FS/FS/cust_main/Billing_Batch.pm
index d8e6f8a..48854d3 100644
--- a/FS/FS/cust_main/Billing_Batch.pm
+++ b/FS/FS/cust_main/Billing_Batch.pm
@@ -89,7 +89,7 @@ sub batch_card {
   #this needs to handle mysql as well as Pg, like svc_acct.pm
   #(make it into a common function if folks need to do batching with mysql)
   $dbh->do("LOCK TABLE pay_batch IN SHARE ROW EXCLUSIVE MODE")
-    or return "Cannot lock pay_batch: " . $dbh->errstr;
+    or die "Cannot lock pay_batch: " . $dbh->errstr;
 
   my %pay_batch = (
     'status' => 'O',
@@ -156,7 +156,8 @@ sub batch_card {
 
   if ( $error ) {
     $dbh->rollback if $oldAutoCommit;
-    die $error;
+    #die $error;
+    return $error; # e.g. "Illegal zip" ala RT#75998
   }
 
   my $unapplied =   $self->total_unapplied_credits

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_main/Billing_Batch.pm |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list