@@ -, +, @@ --- circ/reserveratios.pl | 11 +++--- .../prog/en/modules/circ/reserveratios.tt | 39 ++++++++++++++-------- 2 files changed, 32 insertions(+), 18 deletions(-) --- a/circ/reserveratios.pl +++ a/circ/reserveratios.pl @@ -33,9 +33,10 @@ use C4::Biblio qw/GetMarcBiblio GetRecordValue GetFrameworkCode/; use C4::Acquisition qw/GetOrdersByBiblionumber/; my $input = new CGI; -my $startdate = $input->param('from'); -my $enddate = $input->param('to'); -my $ratio = $input->param('ratio'); +my $startdate = $input->param('from'); +my $enddate = $input->param('to'); +my $ratio = $input->param('ratio'); +my $include_ordered = $input->param('include_ordered'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -90,6 +91,7 @@ if ($enddate) { push @query_params, format_date_in_iso($enddate); } +my $nfl_comparison = $include_ordered ? '<=' : '='; my $strsth = "SELECT reservedate, reserves.borrowernumber as borrowernumber, @@ -118,7 +120,7 @@ my $strsth = LEFT JOIN items ON items.biblionumber=reserves.biblionumber LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber WHERE - notforloan = 0 AND damaged = 0 AND itemlost = 0 AND withdrawn = 0 + notforloan $nfl_comparison 0 AND damaged = 0 AND itemlost = 0 AND withdrawn = 0 $sqldatewhere "; @@ -180,6 +182,7 @@ $template->param( from => $startdate, to => $enddate, ratio => $ratio, + include_ordered => $include_ordered, reserveloop => \@reservedata, ); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -91,20 +91,31 @@

Refine results:

-
  1. -
  2. -
  3. - -
  4. -
  5. - -
+
    +
  1. + + +
  2. + +
  3. + + [% IF include_ordered %] + + [% ELSE %] + + [% END %] +
  4. + +
  5. + + +
  6. + +
  7. + + +
  8. +
(inclusive)
--