fix subtotal and per-group item count on payment report, #25944 and #71364
authorMark Wells <mark@freeside.biz>
Thu, 1 Dec 2016 22:35:59 +0000 (14:35 -0800)
committerMark Wells <mark@freeside.biz>
Thu, 1 Dec 2016 22:39:46 +0000 (14:39 -0800)
httemplate/search/elements/grouped-search/core
httemplate/search/elements/grouped-search/html

index 3d38a8c..b15fe86 100644 (file)
@@ -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++
index 9c2418a..28d0040 100644 (file)
@@ -106,14 +106,18 @@ if ($group_info->{num} > 1) {
 &>
 
 <DIV CLASS="fstabcontainer">
+% if ( $group->num_rows > 0 ) {
+<P><% emt('[quant,_1,_2]', $group->num_rows, $opt{name_singular}) %>
+</P>
 %# download links
-<P><% emt('Download full results') %><BR>
+<P><% emt('Download results:') %>
 % $cgi->param('type', 'xls');
-<A HREF="<% $cgi->self_url %>"><% emt('as Excel spreadsheet') %></A><BR>
+<A HREF="<% $cgi->self_url %>"><% emt('Spreadsheet') %></A>&nbsp;|&nbsp;
 % $cgi->param('type', 'html-print');
-<A HREF="<% $cgi->self_url %>"><% emt('as printable copy') %></A><BR>
+<A HREF="<% $cgi->self_url %>"><% emt('webpage') %></A>
 % $cgi->delete('type');
 </P>
+% }
 
 <% $pager %>