From 64b8300d5e0323d8b27590609578af22ecf0837a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 19 Nov 2014 08:28:32 -0500 Subject: [PATCH] Bug 13299 - Add home library column to the holds ratios report It seems odd that only the holding libraries are listed on the holds ratios report, we should add the home libraries as well. Test Plan: 1) Apply this patch 2) Run the hold ratios report 3) Note the new home libraries column Signed-off-by: Heather Braum Signed-off-by: Jonathan Druart --- circ/reserveratios.pl | 45 ++++++++++++---------- .../prog/en/modules/circ/reserveratios.tt | 4 +- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl index 73c68f0..a08b606 100755 --- a/circ/reserveratios.pl +++ b/circ/reserveratios.pl @@ -100,8 +100,10 @@ my $strsth = items.itemnumber, GROUP_CONCAT(DISTINCT items.itemcallnumber ORDER BY items.itemnumber SEPARATOR '
') as listcall, + GROUP_CONCAT(DISTINCT homebranch + ORDER BY items.itemnumber SEPARATOR '
') as homebranch_list, GROUP_CONCAT(DISTINCT holdingbranch - ORDER BY items.itemnumber SEPARATOR '
') as listbranch, + ORDER BY items.itemnumber SEPARATOR '
') as holdingbranch_list, GROUP_CONCAT(DISTINCT items.location ORDER BY items.itemnumber SEPARATOR '
') as l_location, GROUP_CONCAT(DISTINCT items.itype @@ -142,26 +144,27 @@ while ( my $data = $sth->fetchrow_hashref ) { push( @reservedata, { - reservedate => format_date( $data->{reservedate} ), - priority => $data->{priority}, - name => $data->{borrower}, - title => $data->{title}, - subtitle => $data->{subtitle}, - author => $data->{author}, - itemnum => $data->{itemnumber}, - biblionumber => $data->{biblionumber}, - holdingbranch => $data->{holdingbranch}, - listbranch => $data->{listbranch}, - branch => $data->{branch}, - itemcallnumber => $data->{itemcallnumber}, - location => $data->{l_location}, - itype => $data->{l_itype}, - reservecount => $data->{reservecount}, - itemcount => $data->{itemcount}, - ratiocalc => sprintf("%.0d", $ratio_atleast1 ? ($thisratio / $ratio) : $thisratio), - thisratio => sprintf("%.2f", $thisratio), - thisratio_atleast1 => ($thisratio >= 1) ? 1 : 0, - listcall => $data->{listcall} + reservedate => format_date( $data->{reservedate} ), + priority => $data->{priority}, + name => $data->{borrower}, + title => $data->{title}, + subtitle => $data->{subtitle}, + author => $data->{author}, + itemnum => $data->{itemnumber}, + biblionumber => $data->{biblionumber}, + holdingbranch => $data->{holdingbranch}, + homebranch_list => $data->{homebranch_list}, + holdingbranch_list => $data->{holdingbranch_list}, + branch => $data->{branch}, + itemcallnumber => $data->{itemcallnumber}, + location => $data->{l_location}, + itype => $data->{l_itype}, + reservecount => $data->{reservecount}, + itemcount => $data->{itemcount}, + ratiocalc => sprintf( "%.0d", $ratio_atleast1 ? ( $thisratio / $ratio ) : $thisratio ), + thisratio => sprintf( "%.2f", $thisratio ), + thisratio_atleast1 => ( $thisratio >= 1 ) ? 1 : 0, + listcall => $data->{listcall} } ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt index b12ffc3..a020052 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -55,6 +55,7 @@ Items Hold ratio Title + Home libraries Holding libraries Location Itype @@ -70,7 +71,8 @@

[% reserveloo.thisratio %]

[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title |html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl.subfield %][% END %][% END %][% IF ( reserveloo.author ) %] by [% reserveloo.author %][% END %] -

[% reserveloo.listbranch %]

+

[% reserveloo.homebranch_list %]

+

[% reserveloo.holdingbranch_list %]

[% reserveloo.location %]

[% reserveloo.itype %]

[% reserveloo.listcall %]

-- 2.1.0