blob: 63a050c0449df13aa001bfdf1748dfdb3418f997 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<BR>
<FONT CLASS="fsinnerbox-title">Contacts</FONT>
<A HREF="<%$p%>edit/cust_main-contacts.html?<% $cust_main->custnum %>">Edit contacts</A>
<TABLE CLASS="fsinnerbox">
% foreach my $contact ( @contacts ) {
% #XXX maybe this should be a table with alternating colors instead
<TR>
<TD ALIGN="right"><% $contact->contact_classname %> Contact</TD>
<TD BGCOLOR="#FFFFFF"><% $contact->line %></TD>
% my @contact_email = $contact->contact_email;
% if (@contact_email) {
<TD ALIGN="right"> Email</TD>
<TD BGCOLOR="#FFFFFF"><% join(', ', map $_->emailaddress, @contact_email) %></TD>
% }
% foreach my $phone_type (@phone_type) {
% my $contact_phone =
% qsearchs('contact_phone', {
% 'contactnum' => $contact->contactnum,
% 'phonetypenum' => $phone_type->phonetypenum,
% })
% or next;
<TD ALIGN="right"> <% $phone_type->typename %> phone</TD>
<TD BGCOLOR="#FFFFFF"><% $contact_phone->phonenum |h %></TD>
% }
</TR>
% }
</TABLE>
<%once>
my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
</%once>
<%init>
my( $cust_main ) = @_;
#my $conf = new FS::Conf;
my @contacts = $cust_main->cust_contact;
</%init>
|