summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/cust_main/billing.html18
-rwxr-xr-xhttemplate/edit/process/cust_main.cgi2
-rw-r--r--httemplate/view/cust_main/billing.html12
-rw-r--r--httemplate/view/cust_main/contacts.html2
4 files changed, 27 insertions, 7 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index 3f873174f..d7082f23a 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -481,7 +481,7 @@
? 'CHECKED'
: ''
- %>> <% mt('Postal mail invoice') |h %>
+ %>> <% mt('Postal mail invoices') |h %>
</TD>
</TR>
@@ -493,15 +493,27 @@
? 'CHECKED'
: ''
- %>> <% mt('Fax invoice') |h %>
+ %>> <% mt('Fax invoices') |h %>
</TD>
</TR>
% }
-% unless ( $conf->exists('cust-email-high-visibility')) {
<TR>
+ <TD WIDTH="608" COLSPAN="2"><INPUT TYPE="checkbox" NAME="invoice_email" VALUE="Y" <%
+
+ ( $cust_main->invoice_noemail eq 'Y' )
+ ? ''
+ : 'CHECKED'
+
+ %>> <% mt('Email invoices') |h %>
+
+ </TD>
+ </TR>
+
+% unless ( $conf->exists('cust-email-high-visibility')) {
+ <TR>
<TD ALIGN="right" WIDTH="200">
<% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
? $r : '' %>Email address(es)
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi
index 1cf7a3eb4..3f5e19ef3 100755
--- a/httemplate/edit/process/cust_main.cgi
+++ b/httemplate/edit/process/cust_main.cgi
@@ -66,6 +66,8 @@ my $new = new FS::cust_main ( {
} fields('cust_main')
} );
+$new->invoice_noemail( ($cgi->param('invoice_email') eq 'Y') ? '' : 'Y' );
+
$cgi->param('duplicate_of_custnum') =~ /^(\d+)$/;
my $duplicate_of = $1;
if ( $duplicate_of ) {
diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html
index ba60e13d1..2547ec11f 100644
--- a/httemplate/view/cust_main/billing.html
+++ b/httemplate/view/cust_main/billing.html
@@ -217,21 +217,27 @@
</TR>
% }
<TR>
- <TD ALIGN="right"><% mt('Postal invoices') |h %></TD>
+ <TD ALIGN="right"><% mt('Postal mail invoices') |h %></TD>
<TD BGCOLOR="#ffffff">
<% ( grep { $_ eq 'POST' } @invoicing_list ) ? $yes : $no %>
</TD>
</TR>
<TR>
- <TD ALIGN="right"><% mt('FAX invoices') |h %></TD>
+ <TD ALIGN="right"><% mt('Fax invoices') |h %></TD>
<TD BGCOLOR="#ffffff">
<% ( grep { $_ eq 'FAX' } @invoicing_list ) ? $yes : $no %>
</TD>
</TR>
-% unless ( $conf->exists('cust-email-high-visibility')) {
<TR>
<TD ALIGN="right"><% mt('Email invoices') |h %></TD>
<TD BGCOLOR="#ffffff">
+ <% $cust_main->invoice_noemail ? $no : $yes %>
+ </TD>
+</TR>
+% unless ( $conf->exists('cust-email-high-visibility')) {
+<TR>
+ <TD ALIGN="right"><% mt('Email address(es)') |h %></TD>
+ <TD BGCOLOR="#ffffff">
<% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %>
</TD>
</TR>
diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html
index b3e52b556..12b9391a0 100644
--- a/httemplate/view/cust_main/contacts.html
+++ b/httemplate/view/cust_main/contacts.html
@@ -20,7 +20,7 @@
% if ( $conf->exists('cust-email-high-visibility') && $which eq '') {
<TR>
- <TD ALIGN="right"><% mt('Email invoices') |h %></TD>
+ <TD ALIGN="right"><% mt('Email address(es)') |h %></TD>
<TD BGCOLOR="#ffff00">
<% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %>
</TD>