@@ -, +, @@ --- circ/reserveratios.pl | 19 ++++++++++++++----- .../prog/en/modules/circ/reserveratios.tt | 10 ++++++++++ .../prog/en/modules/help/circ/reserveratios.tt | 4 ++++ 3 files changed, 28 insertions(+), 5 deletions(-) --- a/circ/reserveratios.pl +++ a/circ/reserveratios.pl @@ -36,6 +36,8 @@ my $order = $input->param('order') || ''; my $startdate = $input->param('from'); my $enddate = $input->param('to'); my $ratio = $input->param('ratio'); +my $include_on_order_items = $input->param('include_on_order_items'); +my $include_will_be_available = $input->param('include_will_be_available'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -101,6 +103,10 @@ if ($order eq "biblio") { } else { $sqlorderby = " ORDER BY reservecount DESC "; } + +my $on_order_sql = ( $include_on_order_items ) ? "+ aqorders.quantity" : ""; +my $not_for_loan_comparison = ( $include_will_be_available ) ? "<=" : "="; + my $strsth = "SELECT reservedate, reserves.borrowernumber as borrowernumber, @@ -117,17 +123,18 @@ my $strsth = ORDER BY items.itemnumber SEPARATOR '
') as l_location, GROUP_CONCAT(DISTINCT items.itype ORDER BY items.itemnumber SEPARATOR '
') as l_itype, - notes, + biblio.notes, reserves.found, biblio.title, biblio.author, count(DISTINCT reserves.borrowernumber) as reservecount, - count(DISTINCT items.itemnumber) as itemcount + count(DISTINCT items.itemnumber) $on_order_sql as itemcount FROM reserves LEFT JOIN items ON items.biblionumber=reserves.biblionumber LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber + LEFT JOIN aqorders ON reserves.biblionumber=aqorders.biblionumber WHERE -notforloan = 0 AND damaged = 0 AND itemlost = 0 AND wthdrawn = 0 +notforloan $not_for_loan_comparison 0 AND damaged = 0 AND itemlost = 0 AND wthdrawn = 0 $sqldatewhere "; @@ -157,7 +164,7 @@ while ( my $data = $sth->fetchrow_hashref ) { priority => $data->{priority}, name => $data->{borrower}, title => $data->{title}, - subtitle => $data->{subtitle}, + subtitle => $data->{subtitle}, author => $data->{author}, notes => $data->{notes}, itemnum => $data->{itemnumber}, @@ -185,7 +192,9 @@ $template->param( to => $enddate, ratio => $ratio, reserveloop => \@reservedata, - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + include_on_order_items => $include_on_order_items, + include_will_be_available => $include_will_be_available, ); output_html_with_http_headers $input, $cookie, $template->output; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -179,6 +179,16 @@ Calendar.setup( (inclusive) +
    1. + + +
  • + +
    1. + + +
  • +
    --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/reserveratios.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/reserveratios.tt @@ -4,6 +4,10 @@

    Hold ratios help with collection development. Using this report you will be able to see how many of your patrons have holds on items and whether you should buy more. By default it will be set to the library needing 3 items per hold that has been placed. The report will tell you how many additional items need to be purchased to meet this quota.

    +

    If the checkbox for "Include on order items" is checked, the count of items will include items on order via the acquisitions module.

    + +

    If the checkbox for "Include items that will be available" is checked, the count of items will include items that are currently not for loan but will be ( e.g. items on order, being repaired, etc. ).

    +

    See the full documentation for Hold Ratios in the manual (online).

    [% INCLUDE 'help-bottom.inc' %] --