From 302ed74842d5eae7bcc7c5ce68ee5f102c381d6f Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Sat, 29 Sep 2012 00:20:38 -0700 Subject: [PATCH] also fix longtable in alternate invoice templates, #13908 --- FS/FS/Upgrade.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index 7dd889f2c..3f76f5116 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); } } -- 2.11.0