projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
self-service changes to support e-liance portal, RT#24968
[freeside.git]
/
FS
/
FS
/
cust_main.pm
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
9e3c285
..
0da2364
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-350,6
+350,9
@@
created and inserted.
If I<prospectnum> is set, moves contacts and locations from that prospect.
If I<prospectnum> is set, moves contacts and locations from that prospect.
+If I<contact> is set to an arrayref of FS::contact objects, inserts those
+new contacts with this new customer.
+
=cut
sub insert {
=cut
sub insert {
@@
-538,6
+541,21
@@
sub insert {
}
}
+ my $contact = delete $options{'contact'};
+ if ( $contact ) {
+
+ foreach my $c ( @$contact ) {
+ $c->custnum($self->custnum);
+ my $error = $c->insert;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+
+ }
+
+ }
+
warn " setting cust_main_exemption\n"
if $DEBUG > 1;
warn " setting cust_main_exemption\n"
if $DEBUG > 1;