Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / TaxEngine / compliance_solutions.pm
index c21234e..33b6a3e 100644 (file)
@@ -226,6 +226,7 @@ sub make_taxlines {
     }
   );
   warn $request_json if $DEBUG > 1;
+  $cust_bill->taxengine_request($request_json);
 
   my $soap = SOAP::Lite->service("http://tcms1.csilongwood.com/cgi-bin/taxcalc.wsdl");
 
@@ -279,8 +280,10 @@ sub make_taxlines {
     my $tax_rate_location = FS::tax_rate_location->new({
         data_vendor => 'compliance_solutions',
         geocode     => $tax_data->{'geocode'},
-        state       => $tax_data->{'state'},
-        country     => $tax_data->{'country'},
+        district    => $tax_data->{'geo_district'},
+        state       => $tax_data->{'geo_state'},
+        county      => $tax_data->{'geo_county'},
+        country     => 'US',
     });
     $error = $tax_rate_location->find_or_insert;
     die 'error inserting tax_rate_location record for '.  $tax_data->{state}.