[freeside-commits] branch FREESIDE_3_BRANCH updated. a6fdc051a4920122c2302191be4855cfa7440e80

Ivan ivan at 420.am
Wed May 31 17:55:23 PDT 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  a6fdc051a4920122c2302191be4855cfa7440e80 (commit)
      from  362003556ad0c58f21f82d5529e7bf10049d5688 (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 a6fdc051a4920122c2302191be4855cfa7440e80
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed May 31 17:55:22 2017 -0700

    better error importing credits with unknown customer numbers, RT#76184

diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm
index ca41075..f8c13f9 100644
--- a/FS/FS/cust_credit.pm
+++ b/FS/FS/cust_credit.pm
@@ -154,6 +154,10 @@ sub insert {
   my $dbh = dbh;
 
   my $cust_main = qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
+  unless ( $cust_main ) {
+    $dbh->rollback if $oldAutoCommit;
+    return "Unknown custnum ". $self->custnum;
+  }
   my $old_balance = $cust_main->balance;
 
   if (!$self->reasonnum) {

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

Summary of changes:
 FS/FS/cust_credit.pm |    4 ++++
 1 file changed, 4 insertions(+)




More information about the freeside-commits mailing list