From: Mark Wells Date: Thu, 1 Dec 2016 22:35:59 +0000 (-0800) Subject: fix subtotal and per-group item count on payment report, #25944 and #71364 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=0ed150d5dd7027513942b74eb362460bc7c2e884;hp=85d0dbbdb844857f17192c5f0740f63c9681b9e6 fix subtotal and per-group item count on payment report, #25944 and #71364 --- diff --git a/httemplate/search/elements/grouped-search/core b/httemplate/search/elements/grouped-search/core index 3d38a8c7e..b15fe8659 100644 --- a/httemplate/search/elements/grouped-search/core +++ b/httemplate/search/elements/grouped-search/core @@ -110,7 +110,7 @@ for my $i (0 .. scalar(@groups) - 1) { push @group_labels, $label; my @footer; - if ($opt{'subtotal_row'}) { + if ($opt{'subtotal_row'} and @groups > 1) { for( my $col = 0; exists($opt{'subtotal_row'}[$col]) or exists($opt{'header'}[$col]); $col++ diff --git a/httemplate/search/elements/grouped-search/html b/httemplate/search/elements/grouped-search/html index 9c2418af8..28d00404b 100644 --- a/httemplate/search/elements/grouped-search/html +++ b/httemplate/search/elements/grouped-search/html @@ -106,14 +106,18 @@ if ($group_info->{num} > 1) { &>
+% if ( $group->num_rows > 0 ) { +

<% emt('[quant,_1,_2]', $group->num_rows, $opt{name_singular}) %> +

%# download links -

<% emt('Download full results') %>
+

<% emt('Download results:') %> % $cgi->param('type', 'xls'); -<% emt('as Excel spreadsheet') %>
+<% emt('Spreadsheet') %> |  % $cgi->param('type', 'html-print'); -<% emt('as printable copy') %>
+<% emt('webpage') %> % $cgi->delete('type');

+% } <% $pager %>