tax engine refactoring for Avalara and Billsoft tax vendors, #25718
[freeside.git] / FS / FS / Upgrade.pm
index ce0e328..d76379f 100644 (file)
@@ -113,6 +113,26 @@ If you need to continue using the old Form 477 report, turn on the
 'old_fcc_report' configuration option.
 ";
   }
+
+  # boolean invoice_sections_by_location option is now
+  # invoice_sections_method = 'location'
+  my @invoice_sections_confs =
+    qsearch('conf', { 'name' => { op=>'LIKE', value=>'%sections_by_location' } });
+  foreach my $c (@invoice_sections_confs) {
+    $c->name =~ /^(\w+)sections_by_location$/;
+    $conf->delete($c->name);
+    my $newname = $1.'sections_method';
+    $conf->set($newname, 'location');
+  }
+
+  # boolean enable_taxproducts is now enable_taxproducts = 'cch'
+  if ( $conf->exists('enable_taxproducts') and
+       $conf->config('enable_taxproducts') eq '' ) {
+
+    $conf->set('enable_taxproducts', 'cch');
+
+  }
+
 }
 
 sub upgrade_overlimit_groups {
@@ -362,6 +382,9 @@ sub upgrade_data {
 
     #populate state FIPS codes if not already done
     'state' => [],
+
+    #populate tax statuses
+    'tax_status' => [],
   ;
 
   \%hash;