summaryrefslogtreecommitdiff
path: root/FS/FS/Upgrade.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-09-29 00:20:38 -0700
committerMark Wells <mark@freeside.biz>2012-09-29 00:20:38 -0700
commit302ed74842d5eae7bcc7c5ce68ee5f102c381d6f (patch)
tree24f1090e8d0273326d0bf3d598de12d8713394f1 /FS/FS/Upgrade.pm
parenta10c9fb8cece00fc3b996f56c61b6841e93c1551 (diff)
also fix longtable in alternate invoice templates, #13908
Diffstat (limited to 'FS/FS/Upgrade.pm')
-rw-r--r--FS/FS/Upgrade.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 7dd889f..3f76f51 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -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);
}
}