projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9449483
)
fix disappearing email invoice on errors, finally (closes: Bug#35)
author
ivan
<ivan>
Wed, 2 Apr 2003 03:25:15 +0000
(
03:25
+0000)
committer
ivan
<ivan>
Wed, 2 Apr 2003 03:25:15 +0000
(
03:25
+0000)
httemplate/edit/cust_main.cgi
patch
|
blob
|
history
httemplate/edit/process/cust_main.cgi
patch
|
blob
|
history
diff --git
a/httemplate/edit/cust_main.cgi
b/httemplate/edit/cust_main.cgi
index
6fc086a
..
7065268
100755
(executable)
--- 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 $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 ( {
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');
$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+)$/;
} elsif ( $cgi->keywords ) { #editing
my( $query ) = $cgi->keywords;
$query =~ /^(\d+)$/;
@@
-41,6
+43,7
@@
if ( $cgi->param('error') ) {
$username = '';
$password = '';
$popnum = 0;
$username = '';
$password = '';
$popnum = 0;
+ @invoicing_list = $cust_main->invoicing_list;
} else {
$custnum='';
$cust_main = new FS::cust_main ( {} );
} else {
$custnum='';
$cust_main = new FS::cust_main ( {} );
@@
-50,6
+53,7
@@
if ( $cgi->param('error') ) {
$username = '';
$password = '';
$popnum = 0;
$username = '';
$password = '';
$popnum = 0;
+ @invoicing_list = ();
}
$cgi->delete_all();
my $action = $custnum ? 'Edit' : 'Add';
}
$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"!;
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;
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
c15ea03
..
5e6000c
100755
(executable)
--- 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');
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
#create new record object