pass currency flag with voids and refunds too, for Canadian Moneris, RT#18684
[freeside.git] / FS / FS / Upgrade.pm
index b7971ff..3f76f51 100644 (file)
@@ -71,11 +71,16 @@ sub upgrade_config {
       qw( quotation_html quotation_latex quotation_latexnotes );
 
   # change 'fslongtable' to 'longtable'
-  foreach my $name (qw(invoice_latex quotation_latex)) {
-    my $value = join("\n",$conf->config($name));
-    if (length($value)) {
+  # in invoice and quotation main templates, and also in all secondary 
+  # invoice templates
+  my @latex_confs =
+    qsearch('conf', { 'name' => {op=>'LIKE', value=>'%latex%'} });
+
+  foreach my $c (@latex_confs) {
+    my $value = $c->value;
+    if (length($value) and $value =~ /fslongtable/) {
       $value =~ s/fslongtable/longtable/g;
-      $conf->set($name, $value);
+      $conf->set($c->name, $value, $c->agentnum);
     }
   }
 
@@ -290,6 +295,9 @@ sub upgrade_data {
 
     #flag monthly tax exemptions
     'cust_tax_exempt_pkg' => [],
+
+    #kick off tax location history upgrade
+    'cust_bill_pkg' => [],
   ;
 
   \%hash;