From 394c545b3aaa422ffe5cae781b0e062d36fb6b0f 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 --- 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 cacbe89..554fe5f 100755 --- a/circ/reserveratios.pl +++ b/circ/reserveratios.pl @@ -102,8 +102,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 @@ -144,26 +146,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 5583fd8..80fe4aa 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 %]

-- 1.7.2.5