summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-03-26 19:20:29 -0700
committerMark Wells <mark@freeside.biz>2012-03-26 23:33:19 -0700
commit9b4209f91ad9e3c4cef7deebfb0180f6faf1d0dc (patch)
tree669ab13c6febb3b815613cd0d2227446f3c1b46a /httemplate/edit/process
parent5561349c87fdcc646c18010ea57925f90170f321 (diff)
more contact-aware new customer screen, RT#16819
Diffstat (limited to 'httemplate/edit/process')
-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>