summaryrefslogtreecommitdiff
path: root/httemplate/search/elements/search.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-07-15 17:18:04 -0700
committerMark Wells <mark@freeside.biz>2015-07-15 22:17:33 -0700
commit79110e4c9f798aa38c4bccec6d5be2a0100a5714 (patch)
tree972b61a598a9754b88503bf8f6d3443005119e0f /httemplate/search/elements/search.html
parent76bf98af668225a893150347998aea8cc0856c7d (diff)
fix Excel download of A/R report, from #25994
Diffstat (limited to 'httemplate/search/elements/search.html')
-rw-r--r--httemplate/search/elements/search.html24
1 files changed, 12 insertions, 12 deletions
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html
index f136832..beb0173 100644
--- a/httemplate/search/elements/search.html
+++ b/httemplate/search/elements/search.html
@@ -222,6 +222,18 @@ if ( !$curuser->access_right('Download report data') ) {
$type = 'html';
}
+# split/map aligns here before doing anything else
+my %align = (
+ 'l' => 'left',
+ 'r' => 'right',
+ 'c' => 'center',
+ ' ' => '',
+ '.' => '',
+);
+
+$opt{align} = [ map $align{$_}, split(//, $opt{align}) ],
+ unless !$opt{align} || ref($opt{align});
+
if($type =~ /csv|xls/) {
my $h = $opt{'header'};
my @del;
@@ -245,18 +257,6 @@ $opt{disable_download} = 0
$opt{disable_download} = 1
if $opt{really_disable_download};
-# split/map aligns here, so that agent_virt can add a column
-# (search-html.html will split aligns also if they aren't already split)
-my %align = (
- 'l' => 'left',
- 'r' => 'right',
- 'c' => 'center',
- ' ' => '',
- '.' => '',
-);
-$opt{align} = [ map $align{$_}, split(//, $opt{align}) ],
- unless !$opt{align} || ref($opt{align});
-
# get our queries ready
my $query = $opt{query} or die "query required";
my $count_query = $opt{count_query} or die "count_query required";