1 <% include('elements/process.html',
2 'table' => 'prospect_main',
3 'args_callback' => $args_callback,
7 'fields' => \@contact_fields,
9 'redirect' => popurl(3). 'view/prospect_main.html?',
14 my $args_callback = sub {
15 my( $cgi, $object ) = @_;
17 $cgi->param('locationnum') =~ /^(\-?\d*)$/
18 or die 'illegal locationnum '. $cgi->param('locationnum');
21 return ( 'cust_location' => '' ) unless $locationnum;
23 my $cust_location = new FS::cust_location {
24 map { $_ => scalar($cgi->param($_)) }
25 qw( address1 address2 city county state zip country
27 location_kind location_type location_number
31 $cust_location->locationnum($locationnum) unless $locationnum == -1;
33 ( 'cust_location' => $cust_location );
37 my @contact_fields = qw( classnum first last title comment emailaddress );
38 foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
39 push @contact_fields, 'phonetypenum'.$phone_type->phonetypenum;