3 # $Id: cust_main_county.cgi,v 1.2 1998-11-18 09:01:41 ivan Exp $
5 # ivan@sisd.com 97-dec-16
7 # Changes to allow page to work at a relative position in server
8 # bmccane@maxbaud.net 98-apr-3
10 # lose background, FS::CGI ivan@sisd.com 98-sep-2
12 # $Log: cust_main_county.cgi,v $
13 # Revision 1.2 1998-11-18 09:01:41 ivan
19 use CGI::Carp qw(fatalsToBrowser);
20 use FS::UID qw(cgisuidsetup);
21 use FS::CGI qw(eidiot);
22 use FS::Record qw(qsearch qsearchs);
23 use FS::cust_main_county;
28 foreach ( $cgi->param ) {
29 /^tax(\d+)$/ or die "Illegal form $_!";
31 my($old)=qsearchs('cust_main_county',{'taxnum'=>$taxnum})
32 or die "Couldn't find taxnum $taxnum!";
33 next unless $old->getfield('tax') ne $cgi->param("tax$taxnum");
35 $hash{tax}=$cgi->param("tax$taxnum");
36 my($new)=create FS::cust_main_county \%hash;
37 my($error)=$new->replace($old);
38 eidiot($error) if $error;
41 $cgi->redirect(popurl(3). "/browse/cust_main_county.cgi");