From f62a68016f32b443084705b0e7851497b308f81d Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 26 Mar 2012 19:20:29 -0700 Subject: more contact-aware new customer screen, RT#16819 --- httemplate/edit/process/cust_main.cgi | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'httemplate/edit/process/cust_main.cgi') 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), + ); +} + -- cgit v1.2.1