From 13a2d21811bd0405e4687e0efade9d9fc23b4c59 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 29 Aug 2012 08:44:26 -0400 Subject: [PATCH] Bug 8700 - RESERVESLIP fields not being replaced correctly The slip RESERVESLIP is not replacing fields correctly. C4::Reserves::ReserveSlip calls C4::Letters::GetPreparedLetter, and passes the $reserve hashref to it for each table except branches ( which is passed the branchcode ). The problem is, if you pass a hashref for a table, it uses that hashref for the replacing, rather than looking up the data from the database. Fixed by passing the correct keys for each of the tables requested. Signed-off-by: Marc Veron Tested following the test plan. Could reproduce the bug. After applying the patch slip printed as expected. Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack --- C4/Reserves.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 64cfc4e34c..aeccb12b24 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -2079,9 +2079,9 @@ sub ReserveSlip { tables => { 'reserves' => $reserve, 'branches' => $reserve->{branchcode}, - 'borrowers' => $reserve, - 'biblio' => $reserve, - 'items' => $reserve, + 'borrowers' => $reserve->{borrowernumber}, + 'biblio' => $reserve->{biblionumber}, + 'items' => $reserve->{itemnumber}, }, ); } -- 2.39.5