summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/cust_main-contacts.html
blob: d902dee09868d1c1a1d28909917821b01ee53aa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<% include('elements/process.html',
     'table'          => 'cust_main',
     'error_redirect' => popurl(3). 'edit/cust_main-contacts.html?',
     'agent_virt'     => 1,
     'skip_process'   => 1, #we don't want to make any changes to cust_main
     'process_o2m' => {
       'table'  => 'contact',
       'fields' => \@contact_fields,
     },
     'redirect' => popurl(3). 'view/cust_main.cgi?',
   )
%>
<%init>

my @contact_fields = qw(
  classnum first last title comment emailaddress selfservice_access
);
foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
  push @contact_fields, 'phonetypenum'.$phone_type->phonetypenum;
}

</%init>