removed <!-- $Id$ --> from all files to fix any redirects, whew
[freeside.git] / httemplate / edit / process / cust_main_county.cgi
1 <%
2
3 foreach ( $cgi->param ) {
4   /^tax(\d+)$/ or die "Illegal form $_!";
5   my($taxnum)=$1;
6   my($old)=qsearchs('cust_main_county',{'taxnum'=>$taxnum})
7     or die "Couldn't find taxnum $taxnum!";
8   next unless $old->getfield('tax') ne $cgi->param("tax$taxnum");
9   my(%hash)=$old->hash;
10   $hash{tax}=$cgi->param("tax$taxnum");
11   my($new)=new FS::cust_main_county \%hash;
12   my($error)=$new->replace($old);
13   if ( $error ) {
14     $cgi->param('error', $error);
15     print $cgi->redirect(popurl(2). "cust_main_county.cgi?". $cgi->query_string );
16     myexit();
17   }
18 }
19
20 print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi");
21
22 %>