From c769821c5aa35301a4d292544503d37f4acb3754 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Wed, 20 Jan 2016 01:46:14 +0100 Subject: [PATCH] Bug 15560: Fix display of multiple branches and locations in pending reserves report MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The patches from bug 12152 broke the display on the pending reserves/ holds to pull report when items from multiple branches and with multiple locations were displayed. The table cells were left empty. To test: - Add a record with at least 2 items from different locations and holdingbranches - Open the 'holds to pull' report - Verify all branches and locations show with their correct description Signed-off-by: Natasha Signed-off-by: Jonathan Druart Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com (cherry picked from commit 363cb9c02ed017a0a20951d5caa9f9e5376600d0) Signed-off-by: Julian Maurice (cherry picked from commit 16049ee599d64dfdef7bbb37bd15db2d4ec83547) Signed-off-by: Frédéric Demians --- circ/pendingreserves.pl | 8 ++++---- .../prog/en/modules/circ/pendingreserves.tt | 12 ++++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 947a9fe5b1..dfc4e8fd87 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -107,7 +107,7 @@ if ( $run_report ) { "SELECT min(reservedate) as l_reservedate, reserves.borrowernumber as borrowernumber, GROUP_CONCAT(DISTINCT items.holdingbranch - ORDER BY items.itemnumber SEPARATOR '
') l_holdingbranch, + ORDER BY items.itemnumber SEPARATOR '|') l_holdingbranch, reserves.biblionumber, reserves.branchcode, GROUP_CONCAT(DISTINCT reserves.branchcode @@ -116,7 +116,7 @@ if ( $run_report ) { GROUP_CONCAT(DISTINCT items.itype ORDER BY items.itemnumber SEPARATOR '
') l_itype, GROUP_CONCAT(DISTINCT items.location - ORDER BY items.itemnumber SEPARATOR '
') l_location, + ORDER BY items.itemnumber SEPARATOR '|') l_location, GROUP_CONCAT(DISTINCT items.itemcallnumber ORDER BY items.itemnumber SEPARATOR '
') l_itemcallnumber, GROUP_CONCAT(DISTINCT items.enumchron @@ -177,7 +177,7 @@ if ( $run_report ) { biblionumber => $data->{biblionumber}, statusw => ( $data->{found} eq "W" ), statusf => ( $data->{found} eq "F" ), - holdingbranch => $data->{l_holdingbranch}, + holdingbranches => [split('\|', $data->{l_holdingbranch})],, branch => $data->{l_branch}, itemcallnumber => $data->{l_itemcallnumber}, enumchron => $data->{l_enumchron}, @@ -188,7 +188,7 @@ if ( $run_report ) { rcount => $data->{rcount}, pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, itype => $data->{l_itype}, - location => $data->{l_location}, + locations => [split('\|', $data->{l_location})], } ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index a7fd1f0455..5ec5fd18a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -126,12 +126,20 @@ $(document).ready(function() { " " [% END %] - [% Branches.GetName ( reserveloo.holdingbranch ) %] + + [% FOREACH holdingbranch IN reserveloo.holdingbranches %] + [% Branches.GetName ( holdingbranch ) %]
+ [% END %] +

[% reserveloo.itemcallnumber %]

[% reserveloo.copyno %]

[% reserveloo.enumchron %]

[% ItemTypes.GetDescription( reserveloo.itype ) %] - [% AuthorisedValues.GetByCode('LOC', reserveloo.location) %] + + [% FOREACH loc IN reserveloo.locations %] + [% AuthorisedValues.GetByCode('LOC', loc) %]
+ [% END %] + [% reserveloo.reservedate | $KohaDates %] in [% Branches.GetName ( reserveloo.branch ) %] [% IF ( reserveloo.statusw ) %]

Waiting

[% END %][% IF ( reserveloo.statusf ) %]

Fullfilled

[% END %] -- 2.39.5