X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts_new.html;h=94488670df7f7e9a8af76767f15727b480c1073f;hb=f675734f1eda5b39f891a6fc8f2f29cbd2e36c35;hp=f0bc0b8488542a169dcb26ed6894b36b8f081af6;hpb=aeb90ade381fc3d5477db0334048c2af623fccfe;p=freeside.git
diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html
index f0bc0b848..94488670d 100644
--- 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 ) {
Contacts
-Edit contacts
<& /elements/table-grid.html &>
-% my $bgcolor1 = '#eeeeee';
-% my $bgcolor2 = '#ffffff';
-% my $bgcolor = $bgcolor2;
-% my $th = '
';
+
+% my $th = '';
|
<%$th%>Type
<%$th%>Contact
<%$th%>Email
+ <%$th%>Send invoices
<%$th%>Self-service
% foreach my $phone_type (@phone_type) {
<%$th%><% $phone_type->typename |h %>
% }
<%$th%>Comment
+
+% my $bgcolor1 = '#ffffff';
+% my $bgcolor2 = '#eeeeee';
+% my $bgcolor = $bgcolor2;
% foreach my $cust_contact ( @cust_contacts ) {
% my $contact = $cust_contact->contact;
% my $td = qq( | );
@@ -28,7 +31,7 @@
% my @contact_email = $contact->contact_email;
<%$td%><% join(', ', map $_->emailaddress, @contact_email) %> |
-
+ <%$td%><% $cust_contact->invoice_dest eq 'Y' ? 'Yes' : 'No' %>
<%$td%>
% if ( $cust_contact->selfservice_access ) {
Enabled
@@ -60,6 +63,7 @@
% }
% }
+%}
<%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;
+# 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>