fix fees vs. tax refactor, RT#76366, RT#76490
[freeside.git] / FS / FS / TaxEngine / suretax.pm
index e18b668..1a00cda 100644 (file)
@@ -77,7 +77,7 @@ sub build_request {
   ($self->{bill_zip}, $self->{bill_plus4}) =
     split('-', $cust_main->bill_location->zip);
 
-  $self->{regcode} = $REGCODE{ $conf->config('suretax-regulatory_code') };
+  $self->{regcode} = $REGCODE{ $conf->config('suretax-regulatory_code', $agentnum) };
 
   %taxproduct_cache = ();
 
@@ -97,8 +97,8 @@ sub build_request {
     ClientNumber  => $ClientNumber,
     ValidationKey => $ValidationKey,
     BusinessUnit  => $BusinessUnit,
-    DataYear      => '2015', #$date->year,
-    DataMonth     => '04', #sprintf('%02d', $date->month),
+    DataYear      => $date->year,
+    DataMonth     => sprintf('%02d', $date->month),
     TotalRevenue  => sprintf('%.4f', $cust_bill->charged),
     ReturnFileCode    => ($self->{estimate} ? 'Q' : '0'),
     ClientTracking  => $cust_bill->invnum,