summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/cust_main.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-03-26 19:20:29 -0700
committerIvan Kohler <ivan@freeside.biz>2012-03-26 19:20:29 -0700
commitf62a68016f32b443084705b0e7851497b308f81d (patch)
tree669ab13c6febb3b815613cd0d2227446f3c1b46a /httemplate/edit/process/cust_main.cgi
parent8f6c0d7b137391c6dd9cd1397a73293cd575da13 (diff)
more contact-aware new customer screen, RT#16819
Diffstat (limited to 'httemplate/edit/process/cust_main.cgi')
-rwxr-xr-xhttemplate/edit/process/cust_main.cgi13
1 files changed, 13 insertions, 0 deletions
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi
index 994f9b7ca..44fbb4f10 100755
--- a/httemplate/edit/process/cust_main.cgi
+++ b/httemplate/edit/process/cust_main.cgi
@@ -302,4 +302,17 @@ if ( $new->custnum eq '' or $duplicate_of ) {
}
+unless ( $error ) { #XXX i guess i should be transactional... all in the insert
+ # or replace call
+ my @contact_fields = qw( classnum first last title comment emailaddress );
+ foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
+ push @contact_fields, 'phonetypenum'.$phone_type->phonetypenum;
+ }
+
+ $error = $new->process_o2m( 'table' => 'contact',
+ 'fields' => \@contact_fields,
+ 'params' => scalar($cgi->Vars),
+ );
+}
+
</%init>