From eef42f43c02b386ed7a0b1ce9911964bb94d3e96 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 21 Jan 2004 23:45:03 +0000 Subject: fix newline problem in dump --- httemplate/misc/dump.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'httemplate') diff --git a/httemplate/misc/dump.cgi b/httemplate/misc/dump.cgi index 2c7dfc455..dc1323bb3 100644 --- a/httemplate/misc/dump.cgi +++ b/httemplate/misc/dump.cgi @@ -13,7 +13,7 @@ http_header('Content-Type' => 'text/plain' ); while () { - chomp; -%><%= $_ %><% } - close DUMP; + print $_; + } + close DUMP; %> -- cgit v1.2.1 From 9163d831264988af6065139c7531d59a1bb29c10 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 22 Jan 2004 00:11:01 +0000 Subject: report cancellation errors properly --- httemplate/misc/cust_main-cancel.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate') diff --git a/httemplate/misc/cust_main-cancel.cgi b/httemplate/misc/cust_main-cancel.cgi index 526e128a4..257c3384f 100755 --- a/httemplate/misc/cust_main-cancel.cgi +++ b/httemplate/misc/cust_main-cancel.cgi @@ -7,8 +7,8 @@ my $custnum = $1; my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); -my $error = $cust_main->cancel; -eidiot($error) if $error; +my @errors = $cust_main->cancel; +eidiot(join(' / ', @errors)) if scalar(@errors); #print $cgi->redirect($p. "view/cust_main.cgi?". $cust_main->custnum); print $cgi->redirect($p); -- cgit v1.2.1 From 85be0d954dbe4a2c86841a37dc6a4df690dd5142 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 23 Jan 2004 02:53:12 +0000 Subject: fix state default and set min year to this year, patch from , thanks! --- httemplate/edit/cust_main.cgi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 1909b5438..bfe4a2d4f 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -191,8 +191,10 @@ END my $countrydefault = $conf->config('countrydefault') || 'US'; $cust_main->country( $countrydefault ) unless $cust_main->country; -$cust_main->state( $conf->config('statedefault') || 'CA' ) - unless $cust_main->state || $cust_main->country ne 'US'; +my $statedefault = $conf->config('statedefault') + || ($countrydefault eq 'US' ? 'CA' : ''); +$cust_main->state( $statedefault ) + unless $cust_main->state || $cust_main->country ne $countrydefault; my($county_html, $state_html, $country_html) = FS::cust_main_county::regionselector( $cust_main->county, @@ -343,7 +345,9 @@ sub expselect { $return .= ">$_"; } $return .= qq!/