X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fsearch.html;h=60548e28edffb2bfbc6287c4f66e0e01625e48ea;hp=0e8c69a518999b3e86bc253cc1c37d31abd4fabd;hb=fc263806f5e475559a0c4cfdb70a5f1cefe0ffa3;hpb=8c36d1e4f1255abb483bc7372fa1908cc192b528 diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html index 0e8c69a51..60548e28e 100644 --- a/httemplate/search/elements/search.html +++ b/httemplate/search/elements/search.html @@ -198,6 +198,10 @@ Example: % <% include('search-xml.html', rows=>$rows, opt=>\%opt ) %> % +% } elsif ( $type eq 'deposit_slip' ) { +% +<% include('search-deposit_slip.html', rows=>$rows, opt=>\%opt ) %> +% % } else { % <% include('search-html.html', @@ -224,8 +228,9 @@ my $curuser = $FS::CurrentUser::CurrentUser; $m->comp('/elements/handle_uri_query'); -my $type = $cgi->param('_type') =~ /^(csv|\w*\.xls|xml|select|html(-print)?)$/ - ? $1 : 'html' ; +my $type = $cgi->param('_type') + =~ /^(csv|\w*\.xls|xml|select|html(-print)?|deposit_slip)$/ + ? $1 : 'html' ; if ( !$curuser->access_right('Download report data') ) { $opt{'disable_download'} = 1; @@ -389,14 +394,15 @@ unless ( $type =~ /^(csv|xml|\w*.xls)$/) { #setup some pagination things if we're in html mode my $conf = new FS::Conf; - $confmax = $conf->config('maxsearchrecordsperpage') || 100; - if ( $cgi->param('maxrecords') =~ /^(\d+)$/ ) { - $maxrecords = $1; - } else { - $maxrecords ||= $confmax; - } - $opt{'disable_maxselect'} ||= $conf->exists('disable_maxselect'); + unless ($opt{'disable_maxselect'}) { + $confmax = $conf->config('maxsearchrecordsperpage') || 100; + if ( $cgi->param('maxrecords') =~ /^(\d+)$/ ) { + $maxrecords = $1; + } else { + $maxrecords ||= $confmax; + } + } $limit = $maxrecords ? "LIMIT $maxrecords" : '';