From b94de8e60418744e1526d96a0e85715e3e350c9d Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 30 Nov 2015 15:35:32 -0800 Subject: make cust-email-high-visibility non-optional, and improve display of invoice delivery settings, #28226 --- httemplate/view/cust_main/contacts.html | 37 +++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'httemplate/view/cust_main/contacts.html') 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) %> -% } -% if ( $conf->exists('cust-email-high-visibility') ) { +% } +% +% # invoicing email +% if ( scalar(@invoicing_list) == 1 ) { # typical individual user; show here - <% mt('Email address(es)') |h %> - - <% $cust_main->invoicing_list_emailonly_scalar || $no %> + <% mt('Email address') |h %> + + <% $invoicing_list[0] %> -% } +% } elsif ( scalar(@invoicing_list) > 1 ) { +% # business customer with a contact list +% # show nothing here +% +% } else { # there is no invoice email for them + + <% mt('Email address') |h %> +% 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. + <% emt('none') %> +% } else { + <% emt('no') %> +% } +% } # end of invoicing email + % if ( $cust_main->company ) { <% mt('Company') |h %> @@ -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; - -- cgit v1.2.1