projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improve RADIUS data usage report: multiple export selection, optionally group by...
[freeside.git]
/
httemplate
/
view
/
cust_main
/
contacts_new.html
diff --git
a/httemplate/view/cust_main/contacts_new.html
b/httemplate/view/cust_main/contacts_new.html
index
f0bc0b8
..
9448867
100644
(file)
--- a/
httemplate/view/cust_main/contacts_new.html
+++ b/
httemplate/view/cust_main/contacts_new.html
@@
-1,23
+1,26
@@
+% if ( $display and @cust_contacts ) {
<BR>
<FONT CLASS="fsinnerbox-title">Contacts</FONT>
<BR>
<FONT CLASS="fsinnerbox-title">Contacts</FONT>
-<A HREF="<%$p%>edit/cust_main-contacts.html?<% $cust_main->custnum %>">Edit contacts</A>
<& /elements/table-grid.html &>
<& /elements/table-grid.html &>
-% my $bgcolor1 = '#eeeeee';
-% my $bgcolor2 = '#ffffff';
-% my $bgcolor = $bgcolor2;
-% my $th = '<TH CLASS="grid" ALIGN="left" BGCOLOR="#cccccc">';
+<THEAD>
+% my $th = '<TH CLASS="grid" ALIGN="left">';
<TR>
<%$th%>Type</TH>
<%$th%>Contact</TH>
<%$th%>Email</TH>
<TR>
<%$th%>Type</TH>
<%$th%>Contact</TH>
<%$th%>Email</TH>
+ <%$th%>Send invoices</TH>
<%$th%>Self-service</TH>
% foreach my $phone_type (@phone_type) {
<%$th%><% $phone_type->typename |h %></TH>
% }
<%$th%>Comment</TH>
</TR>
<%$th%>Self-service</TH>
% foreach my $phone_type (@phone_type) {
<%$th%><% $phone_type->typename |h %></TH>
% }
<%$th%>Comment</TH>
</TR>
+</THEAD>
+% my $bgcolor1 = '#ffffff';
+% my $bgcolor2 = '#eeeeee';
+% my $bgcolor = $bgcolor2;
% foreach my $cust_contact ( @cust_contacts ) {
% my $contact = $cust_contact->contact;
% my $td = qq(<TD CLASS="grid" BGCOLOR="$bgcolor">);
% foreach my $cust_contact ( @cust_contacts ) {
% my $contact = $cust_contact->contact;
% my $td = qq(<TD CLASS="grid" BGCOLOR="$bgcolor">);
@@
-28,7
+31,7
@@
% my @contact_email = $contact->contact_email;
<%$td%><% join(', ', map $_->emailaddress, @contact_email) %></TD>
% my @contact_email = $contact->contact_email;
<%$td%><% join(', ', map $_->emailaddress, @contact_email) %></TD>
-
+ <%$td%><% $cust_contact->invoice_dest eq 'Y' ? 'Yes' : 'No' %></TD>
<%$td%>
% if ( $cust_contact->selfservice_access ) {
Enabled
<%$td%>
% if ( $cust_contact->selfservice_access ) {
Enabled
@@
-60,6
+63,7
@@
% }
% }
</TABLE>
% }
% }
</TABLE>
+%}
<%once>
my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
<%once>
my @phone_type = qsearch({table=>'phone_type', order_by=>'weight'});
@@
-72,4
+76,8
@@
my( $cust_main ) = @_;
my @cust_contacts = $cust_main->cust_contact;
my @cust_contacts = $cust_main->cust_contact;
+# residential customers have a default "invisible" contact, but if they
+# somehow get more than one contact, show them
+my $display = scalar(@cust_contacts) > 1;
+
</%init>
</%init>