3 my($query) = $cgi->keywords;
4 $query =~ /^(\d+)$/ or die "Illegal taxnum!";
6 my $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum})
7 or die ("Unknown taxnum!");
9 #really should do this in a .pm & start transaction
11 foreach my $delete ( qsearch('cust_main_county', {
12 'country' => $cust_main_county->country,
13 'state' => $cust_main_county->state
15 # unless ( qsearch('cust_main',{
16 # 'state' => $cust_main_county->getfield('state'),
17 # 'county' => $cust_main_county->getfield('county'),
18 # 'country' => $cust_main_county->getfield('country'),
20 my $error = $delete->delete;
23 #should really fix the $cust_main record
28 $cust_main_county->taxnum('');
29 $cust_main_county->county('');
30 my $error = $cust_main_county->insert;
33 print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi");