From 685e4c619cadadba55590b04c44f563a925b6baa Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 21 Nov 2001 03:40:03 +0000 Subject: [PATCH] postalinvoicedefault config file --- FS/FS/Conf.pm | 7 +++++++ httemplate/edit/cust_main.cgi | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 569eaabb5..bf27bf348 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -301,6 +301,13 @@ httemplate/docs/config.html }, { + 'key' => 'postalinvoicedefault', + 'section' => 'billing', + 'description' => 'Disables postal mail invoices as the default option in the UI. Be careful not to setup customers which are not sent invoices. See emailinvoiceauto.', + 'type' => 'checkbox', + }, + + { 'key' => 'emailinvoiceauto', 'section' => 'billing', 'description' => 'Automatically adds new accounts to the email invoice list upon customer creation', diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index cfd99c824..68765ca67 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -1,5 +1,5 @@ <% -# +# use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum $last $first $ss $company $address1 $address2 $city $zip @@ -345,7 +345,8 @@ print qq!>Tax Exempt!; print qq!invoicing_list; print qq! CHECKED! - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; + if ( ! @invoicing_list && ! $conf->exists('postalinvoicedefault') ) + || grep { $_ eq 'POST' } @invoicing_list; print qq!>Postal mail invoice!; $invoicing_list = join(', ', grep { $_ ne 'POST' } @invoicing_list ); print qq!Email invoice !; -- 2.11.0