[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 8b1ba5b29a5bdc0968e0ac9f0f1591a5d6badbd2
Mark Wells
mark at 420.am
Sat Sep 29 15:33:51 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 8b1ba5b29a5bdc0968e0ac9f0f1591a5d6badbd2 (commit)
from 2321d2f1320f0054a5802377c2a89e14fc82dc00 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8b1ba5b29a5bdc0968e0ac9f0f1591a5d6badbd2
Author: Mark Wells <mark at freeside.biz>
Date: Sat Sep 29 14:44:18 2012 -0700
also fix longtable in alternate invoice templates, #13908
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 400bacc..14527f9 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -65,11 +65,15 @@ sub upgrade_config {
map { upgrade_overlimit_groups($conf,$_->agentnum) } qsearch('agent', {});
# change 'fslongtable' to 'longtable'
- foreach my $name (qw(invoice_latex)) {
- my $value = join("\n",$conf->config($name));
- if (length($value)) {
+ # in invoice main template, 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);
}
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Upgrade.pm | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list