summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/contacts.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-11-30 15:35:32 -0800
committerMark Wells <mark@freeside.biz>2015-11-30 15:39:25 -0800
commitb94de8e60418744e1526d96a0e85715e3e350c9d (patch)
tree36b6e15b342bd2e54bdd0329aed6048a6a43b5f7 /httemplate/view/cust_main/contacts.html
parentcb28905b4bc28f3d7a1a67d14cf9c8b44fafe2d5 (diff)
make cust-email-high-visibility non-optional, and improve display of invoice delivery settings, #28226
Diffstat (limited to 'httemplate/view/cust_main/contacts.html')
-rw-r--r--httemplate/view/cust_main/contacts.html37
1 files changed, 28 insertions, 9 deletions
diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html
index e3d5d63cb..a41a4836b 100644
--- a/httemplate/view/cust_main/contacts.html
+++ b/httemplate/view/cust_main/contacts.html
@@ -43,15 +43,36 @@
$cust_main->spouse_last, $cust_main->spouse_first) %>
</TD>
</TR>
-% }
-% if ( $conf->exists('cust-email-high-visibility') ) {
+% }
+%
+% # invoicing email
+% if ( scalar(@invoicing_list) == 1 ) { # typical individual user; show here
<TR>
- <TH ALIGN="right"><% mt('Email address(es)') |h %></TH>
- <TD BGCOLOR="#ffff00">
- <% $cust_main->invoicing_list_emailonly_scalar || $no %>
+ <TH ALIGN="right"><% mt('Email address') |h %></TH>
+ <TD>
+ <% $invoicing_list[0] %>
</TD>
</TR>
-% }
+% } elsif ( scalar(@invoicing_list) > 1 ) {
+% # business customer with a contact list
+% # show nothing here
+%
+% } else { # there is no invoice email for them
+ <TR>
+ <TH ALIGN="right"><% mt('Email address') |h %></TH>
+% if ( !$cust_main->postal_invoice or
+% $conf->exists('cust_main-require_invoicing_list_email',
+% $cust_main->agentnum)
+% ) {
+% # we need a contact email for this customer (either because that's
+% # policy, or because otherwise they won't receive invoices) but we
+% # don't have one.
+ <TD CLASS="error"><% emt('none') %></TD>
+% } else {
+ <TD><% emt('no') %></TD>
+% }
+% } # end of invoicing email
+
% if ( $cust_main->company ) {
<TR>
<TH ALIGN="right"><% mt('Company') |h %></TH>
@@ -195,8 +216,6 @@ my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_st
my $cust_main = shift;
my $conf = new FS::Conf;
-my @invoicing_list = $cust_main->invoicing_list;
-my $no = emt('no');
+my @invoicing_list = $cust_main->invoicing_list_emailonly;
</%init>
-