2 <FONT CLASS="fsinnerbox-title">Contacts</FONT>
3 <A HREF="<%$p%>edit/cust_main-contacts.html?<% $cust_main->custnum %>">Edit contacts</A>
5 <& /elements/table-grid.html &>
6 % my $bgcolor1 = '#eeeeee';
7 % my $bgcolor2 = '#ffffff';
8 % my $bgcolor = $bgcolor2;
9 % my $th = '<TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">';
14 <%$th%>Self-service</TH>
15 % foreach my $phone_type (@phone_type) {
16 <%$th%><% $phone_type->typename |h %></TH>
21 % foreach my $cust_contact ( @cust_contacts ) {
22 % my $contact = $cust_contact->contact;
23 % my $td = qq(<TD CLASS="grid" BGCOLOR="$bgcolor">);
26 <%$td%><% $cust_contact->contact_classname |h %></TD>
27 <%$td%><% $contact->line |h %></TD>
29 % my @contact_email = $contact->contact_email;
30 <%$td%><% join(', ', map $_->emailaddress, @contact_email) %></TD>
33 % if ( $cust_contact->selfservice_access ) {
35 %# <FONT SIZE="-1"><A HREF="XXX">disable</A>
36 %# <A HREF="XXX">re-email</A></FONT>
39 %# <FONT SIZE="-1"><A HREF="XXX">enable</A></FONT>
43 % foreach my $phone_type (@phone_type) {
45 % qsearchs('contact_phone', {
46 % 'contactnum' => $contact->contactnum,
47 % 'phonetypenum' => $phone_type->phonetypenum,
49 <%$td%><% $contact_phone ? $contact_phone->phonenum_pretty : '' |h %></TD>
52 <%$td%><% $cust_contact->comment |h %></TD>
56 % if ( $bgcolor eq $bgcolor1 ) {
57 % $bgcolor = $bgcolor2;
59 % $bgcolor = $bgcolor1;
65 my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
70 my( $cust_main ) = @_;
71 #my $conf = new FS::Conf;
73 my @cust_contacts = $cust_main->cust_contact;