X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fsearch.html;h=60548e28edffb2bfbc6287c4f66e0e01625e48ea;hp=5762afbe59da542b7d4e8bc579e585002861ed9a;hb=fc263806f5e475559a0c4cfdb70a5f1cefe0ffa3;hpb=b278990fcae28c2f2c09a66ed8f388ac0fa478f8 diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html index 5762afbe5..60548e28e 100644 --- a/httemplate/search/elements/search.html +++ b/httemplate/search/elements/search.html @@ -119,7 +119,11 @@ Example: #(query needs to be a qsearch hashref and # header & fields need to be defined) - #handling agent virtualization + # Agent Virtualization parameters: + # In this context, only available if your selected table has agentnum. + # You must also include agentnum as a SELECT column in your SQL query, + # or experience non-obvious problems + # 'agent_virt' => 1, # set true if this search should be # agent-virtualized 'agent_null' => 1, # set true to view global records always @@ -194,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', @@ -218,8 +226,11 @@ my(%opt) = @_; my $curuser = $FS::CurrentUser::CurrentUser; -my $type = $cgi->param('_type') =~ /^(csv|\w*\.xls|xml|select|html(-print)?)$/ - ? $1 : 'html' ; +$m->comp('/elements/handle_uri_query'); + +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; @@ -383,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" : '';