diff options
| author | ivan <ivan> | 2009-10-30 00:02:52 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2009-10-30 00:02:52 +0000 |
| commit | 1a71a9d6cb7f847947b1e95a61f49cf16b92ab6a (patch) | |
| tree | ccccf62a1bb287a7a2c8b263cd520f452b29233e /httemplate/edit/process | |
| parent | cccd6a6039ed390c95f1989f8ac8af259ffc2061 (diff) | |
bulk tax changes, RT#6445
Diffstat (limited to 'httemplate/edit/process')
| -rw-r--r-- | httemplate/edit/process/bulk-cust_main_county.html | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/httemplate/edit/process/bulk-cust_main_county.html b/httemplate/edit/process/bulk-cust_main_county.html index e05192e96..af9e49500 100644 --- a/httemplate/edit/process/bulk-cust_main_county.html +++ b/httemplate/edit/process/bulk-cust_main_county.html @@ -1,6 +1,6 @@ % if ( $error ) { #better to redirect back to %# <% $cgi->redirect("$url?". $cgi->query_string ) %> - <% include('/elements/header-popup.html', 'Error adding taxes' ) %> + <% include('/elements/header-popup.html', "Error ${action}ing taxes" ) %> <FONT SIZE="+1" COLOR="#ff0000">Error: <% $error |h %></FONT> <BR><BR> @@ -9,7 +9,7 @@ </HTML> % } else { - <% include('/elements/header-popup.html', 'Taxes added') %> + <% include('/elements/header-popup.html', "Taxes ${action}ed") %> <SCRIPT TYPE="text/javascript"> window.top.location.reload(); @@ -24,13 +24,16 @@ $cgi->param('taxnum') =~ /^([\d,]+)$/ or die 'Guru Meditation #69'; #??? should have been passed in my @taxnum = split(',', $1); +$cgi->param('action') =~ /^(add|edit)$/ or die "unknown action"; +my $action = $1; + my $error = ''; foreach my $taxnum ( @taxnum ) { my $cust_main_county = qsearchs('cust_main_county', { 'taxnum' => $taxnum } ) or die "unknown taxnum: $taxnum"; - if ( $cust_main_county->tax == 0 ) { #let's replace + if ( $action eq 'edit' || $cust_main_county->tax == 0 ) { #let's replace foreach (qw( taxname tax exempt_amount setuptax recurtax )) { $cust_main_county->set( $_ => scalar($cgi->param($_)) ) |
