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 next unless $old->tax != $cgi->param("tax$taxnum")
9 || $old->exempt_amount != $cgi->param("exempt_amount$taxnum")
10 || $old->taxname ne $cgi->param("taxname$taxnum");
11 my %hash = $old->hash;
12 $hash{tax} = $cgi->param("tax$taxnum");
13 $hash{exempt_amount} = $cgi->param("exempt_amount$taxnum");
14 $hash{taxname} = $cgi->param("taxname$taxnum");
15 my $new = new FS::cust_main_county \%hash;
16 my $error = $new->replace($old);
18 $cgi->param('error', $error);
19 print $cgi->redirect(popurl(2). "cust_main_county.cgi?". $cgi->query_string );
24 print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi");