summaryrefslogtreecommitdiff
path: root/httemplate/search/elements/grouped-search
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/elements/grouped-search')
-rw-r--r--httemplate/search/elements/grouped-search/deposit_slip8
-rw-r--r--httemplate/search/elements/grouped-search/html6
2 files changed, 13 insertions, 1 deletions
diff --git a/httemplate/search/elements/grouped-search/deposit_slip b/httemplate/search/elements/grouped-search/deposit_slip
new file mode 100644
index 0000000..6e69662
--- /dev/null
+++ b/httemplate/search/elements/grouped-search/deposit_slip
@@ -0,0 +1,8 @@
+<& /search/elements/search-deposit_slip.html, rows=>\@rows, &>\
+<%init>
+my %opt = @_;
+my $group_info = $m->comp('core', %opt);
+#just the first group
+my $query = $group_info->{queries}[0];
+my @rows = $query->qsearch;
+</%init>
diff --git a/httemplate/search/elements/grouped-search/html b/httemplate/search/elements/grouped-search/html
index ae80865..24cf50e 100644
--- a/httemplate/search/elements/grouped-search/html
+++ b/httemplate/search/elements/grouped-search/html
@@ -114,9 +114,13 @@ my $money = $conf->config('money_char') || '$';
%# download links
<P><% emt('Download results:') %>
% $cgi->param('type', 'xls');
-<A HREF="<% $cgi->self_url %>"><% emt('Spreadsheet') %></A>&nbsp;|&nbsp;
+<A HREF="<% $cgi->self_url %>"><% emt('Spreadsheet') %></A> |
% $cgi->param('type', 'html-print');
<A HREF="<% $cgi->self_url %>"><% emt('webpage') %></A>
+% if ( ref($query) && $query->{table} eq 'cust_pay' ) {
+% $cgi->param('type', 'deposit_slip');
+ | <A HREF="<% $cgi->self_url %>"><% emt('deposit slip') %></A>
+% }
% $cgi->delete('type');
</P>
% }