From: levinse Date: Mon, 30 May 2011 23:27:10 +0000 (+0000) Subject: optional better visibility for invoicing email field, RT12944 X-Git-Tag: freeside_2_1_3~188 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=113d47ee6ca162ee0adb5bd2a74b59cc56b7f8a9;p=freeside.git optional better visibility for invoicing email field, RT12944 --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index fc5336aa0..da010f43e 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -4392,6 +4392,13 @@ and customer address. Include units.', 'description' => 'Show a link to the payment history report in the Reports menu. DO NOT ENABLE THIS.', 'type' => 'checkbox', }, + + { + 'key' => 'cust-email-high-visibility', + 'section' => 'UI', + 'description' => 'Move the invoicing e-mail address field to the top of the billing address section and highlight it.', + 'type' => 'checkbox', + }, { key => "apacheroot", section => "deprecated", description => "DEPRECATED", type => "text" }, { key => "apachemachine", section => "deprecated", description => "DEPRECATED", type => "text" }, diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index f39cfd99f..f2fa37f6e 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -444,12 +444,14 @@ % } +% unless ( $conf->exists('cust-email-high-visibility')) { <% $conf->exists('cust_main-require_invoicing_list_email') ? $r : '' %>Email address(es) +% } Invoice terms diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html index 99bc558c3..c0989e22b 100644 --- a/httemplate/edit/cust_main/contact.html +++ b/httemplate/edit/cust_main/contact.html @@ -18,6 +18,17 @@ +% if ( $conf->exists('cust-email-high-visibility') && !$pre ) { + + + <% $conf->exists('cust_main-require_invoicing_list_email') ? $r : '' %>Email address(es) + + + + + +% } + Company @@ -147,4 +158,6 @@ my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_st my $r = qq!* !; +my @invoicing_list = $cust_main->invoicing_list; + diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index efff3ed1c..f2596dbae 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -203,12 +203,14 @@ Billing information <% ( grep { $_ eq 'FAX' } @invoicing_list ) ? 'yes' : 'no' %> +% unless ( $conf->exists('cust-email-high-visibility')) { Email invoices <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %> +% } Invoice terms diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index e91af54e6..494012e39 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -17,6 +17,14 @@ <% $cust_main->masked('ss') || ' ' %> % } +% if ( $conf->exists('cust-email-high-visibility') && $which eq '') { + + <% mt('Email invoices') |h %> + + <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %> + + +% } Company <% $cust_main->get("${pre}company") |h %> @@ -117,6 +125,8 @@ my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_st my( $cust_main ) = @_; my $conf = new FS::Conf; +my @invoicing_list = $cust_main->invoicing_list; +my $no = emt('no');