X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fcust_main.cgi;h=44fbb4f10f562d827e60ebc183311d5d1ccf42ed;hp=994f9b7ca501eb494cfd6392ba52d557ebb35e0f;hb=9b4209f91ad9e3c4cef7deebfb0180f6faf1d0dc;hpb=5561349c87fdcc646c18010ea57925f90170f321 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), + ); +} +