texas tax!
[freeside.git] / httemplate / edit / process / cust_main_county-expand.cgi
index b16fab4..a452711 100755 (executable)
@@ -1,4 +1,3 @@
-<!-- $Id: cust_main_county-expand.cgi,v 1.4 2002-01-30 14:18:09 ivan Exp $ -->
 <%
 
 $cgi->param('taxnum') =~ /^(\d+)$/ or die "Illegal taxnum!";
@@ -19,7 +18,7 @@ if ( $cgi->param('delim') eq 'n' ) {
   unless ( /^\s*([\w\- ]+)\s*$/ ) {
     $cgi->param('error', "Illegal item in expansion");
     print $cgi->redirect(popurl(2). "cust_main_county-expand.cgi?". $cgi->query_string );
-    exit;
+    myexit();
   }
   $1;
 } @expansion;
@@ -28,7 +27,9 @@ foreach ( @expansion) {
   my(%hash)=$cust_main_county->hash;
   my($new)=new FS::cust_main_county \%hash;
   $new->setfield('taxnum','');
-  if ( ! $cust_main_county->state ) {
+  if ( $cgi->param('taxclass') ) {
+    $new->setfield('taxclass', $_);
+  } elsif ( ! $cust_main_county->state ) {
     $new->setfield('state',$_);
   } else {
     $new->setfield('county',$_);