[freeside-commits] branch FREESIDE_3_BRANCH updated. 4d27115f3f5d290602d1c656d8b20d5bbfc30f4d

Ivan ivan at 420.am
Wed Apr 22 14:33:56 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  4d27115f3f5d290602d1c656d8b20d5bbfc30f4d (commit)
       via  4e3d17eefa30165031b551ddaed03007a7579ceb (commit)
      from  005571eaf7291ae53724590e2c8d8374c0020378 (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 4d27115f3f5d290602d1c656d8b20d5bbfc30f4d
Merge: 4e3d17e 005571e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Apr 22 14:33:50 2015 -0700

    Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH


commit 4e3d17eefa30165031b551ddaed03007a7579ceb
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Apr 22 14:33:22 2015 -0700

    fix contact addition in v3 new_customer_minimal, RT#34084

diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 7c26d89..6aaeac6 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -541,6 +541,33 @@ sub insert {
 
   }
 
+  warn "  setting contacts\n"
+    if $DEBUG > 1;
+
+  if ( my $contact = delete $options{'contact'} ) {
+
+    foreach my $c ( @$contact ) {
+      $c->custnum($self->custnum);
+      my $error = $c->insert;
+      if ( $error ) {
+        $dbh->rollback if $oldAutoCommit;
+        return $error;
+      }
+
+    }
+
+  } elsif ( my $contact_params = delete $options{'contact_params'} ) {
+
+    my $error = $self->process_o2m( 'table'  => 'contact',
+                                    'fields' => FS::contact->cgi_contact_fields,
+                                    'params' => $contact_params,
+                                  );
+    if ( $error ) {
+      $dbh->rollback if $oldAutoCommit;
+      return $error;
+    }
+  }
+
   warn "  setting cust_main_exemption\n"
     if $DEBUG > 1;
 

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

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




More information about the freeside-commits mailing list