3 foreach ( grep { /^tax\d+$/ } $cgi->param ) {
4 /^tax(\d+)$/ or die "Illegal form $_!";
6 my($old)=qsearchs('cust_main_county',{'taxnum'=>$taxnum})
7 or die "Couldn't find taxnum $taxnum!";
8 my $exempt_amount = $cgi->param("exempt_amount$taxnum");
9 next unless $old->tax ne $cgi->param("tax$taxnum")
10 || $old->exempt_amount ne $exempt_amount;
11 my %hash = $old->hash;
12 $hash{tax} = $cgi->param("tax$taxnum");
13 $hash{exempt_amount} = $exempt_amount;
14 my($new)=new FS::cust_main_county \%hash;
15 my($error)=$new->replace($old);
17 $cgi->param('error', $error);
18 print $cgi->redirect(popurl(2). "cust_main_county.cgi?". $cgi->query_string );
23 print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi");