diff options
author | ivan <ivan> | 2003-04-02 03:23:31 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-04-02 03:23:31 +0000 |
commit | 2a0fb861aa1ec98db205b0b427e8a73e1568eb5f (patch) | |
tree | 6500b1b2e79b61acbf6f7d4f7f6b7ed37908704b | |
parent | 026b5b97597172197d95d409820ca2575738bf17 (diff) |
fix disappearing email invoice on errors, finally (closes: Bug#35)
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 6 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 6fc086a12..706526865 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -17,6 +17,7 @@ my $conf = new FS::Conf; my $error = ''; my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart); +my(@invoicing_list); if ( $cgi->param('error') ) { $error = $cgi->param('error'); $cust_main = new FS::cust_main ( { @@ -32,6 +33,7 @@ if ( $cgi->param('error') ) { $username = $cgi->param('username'); $password = $cgi->param('_password'); $popnum = $cgi->param('popnum'); + @invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') ); } elsif ( $cgi->keywords ) { #editing my( $query ) = $cgi->keywords; $query =~ /^(\d+)$/; @@ -41,6 +43,7 @@ if ( $cgi->param('error') ) { $username = ''; $password = ''; $popnum = 0; + @invoicing_list = $cust_main->invoicing_list; } else { $custnum=''; $cust_main = new FS::cust_main ( {} ); @@ -50,6 +53,7 @@ if ( $cgi->param('error') ) { $username = ''; $password = ''; $popnum = 0; + @invoicing_list = (); } $cgi->delete_all(); my $action = $custnum ? 'Edit' : 'Add'; @@ -383,7 +387,7 @@ if ( $payby_default eq 'HIDE' ) { print qq!>Tax Exempt</TD></TR><TR><TD>!. qq!<INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"!; - my @invoicing_list = $cust_main->invoicing_list; + #my @invoicing_list = $cust_main->invoicing_list; print qq! CHECKED! if ( ! @invoicing_list && ! $conf->exists('disablepostalinvoicedefault') ) || grep { $_ eq 'POST' } @invoicing_list; diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index c15ea0321..5e6000c05 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -25,6 +25,7 @@ $cgi->param('otaker', &getotaker ); my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') ); push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST'); +$cgi->param('invoicing_list', join(',', @invoicing_list) ); #create new record object |