X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fbulk-cust_main_county.html;h=b5a0258b162aa6c69835559b2079b347d167d74f;hb=b71b1576c68bc40ad26592b354feace37a029f0e;hp=e05192e9628617f388ffe31458dc32310ef9b0ad;hpb=9eded70a59f22d7df3b645ad3636e28e0fd08bee;p=freeside.git diff --git a/httemplate/edit/process/bulk-cust_main_county.html b/httemplate/edit/process/bulk-cust_main_county.html index e05192e96..b5a0258b1 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" ) %> Error: <% $error |h %>

@@ -9,10 +9,10 @@ % } else { - <% include('/elements/header-popup.html', 'Taxes added') %> + <% include('/elements/header-popup.html', "Taxes ${action}ed") %> @@ -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($_)) ) @@ -46,7 +49,7 @@ foreach my $taxnum ( @taxnum ) { qw( taxname tax exempt_amount setuptax recurtax ) ), ( map { $_ => $cust_main_county->get($_) } - qw( country state county taxclass ) + qw( country state county city district taxclass ) ) };