3 # $Id: cust_main_county.cgi,v 1.3 1998-12-17 08:40:21 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.3 1998-12-17 08:40:21 ivan
14 # s/CGI::Request/CGI.pm/; etc
16 # Revision 1.2 1998/11/18 09:01:41 ivan
22 use CGI::Carp qw(fatalsToBrowser);
23 use FS::UID qw(cgisuidsetup);
24 use FS::CGI qw(eidiot);
25 use FS::Record qw(qsearch qsearchs);
26 use FS::cust_main_county;
31 foreach ( $cgi->param ) {
32 /^tax(\d+)$/ or die "Illegal form $_!";
34 my($old)=qsearchs('cust_main_county',{'taxnum'=>$taxnum})
35 or die "Couldn't find taxnum $taxnum!";
36 next unless $old->getfield('tax') ne $cgi->param("tax$taxnum");
38 $hash{tax}=$cgi->param("tax$taxnum");
39 my($new)=create FS::cust_main_county \%hash;
40 my($error)=$new->replace($old);
41 eidiot($error) if $error;
44 print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi");