From a38d82d4676a85d0e3b7c22660d947e86511c65b Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Tue, 23 Aug 2022 13:48:39 +0300 Subject: [PATCH] Bug 31447: Use holds pick up branch in "Please confirm checkout" message When one tries to check out item which has hold in it, "Please confirm checkout" message uses patrons home library instead of holds pick up library. It would be more logical to use latter here. To test: 1. Find record with holds. 2. For first priority hold, change it's pick up library to differ from patrons homebranch if needed. 3. Check out records item for a different patron. => Note that notice reads: "Item ... has been on hold for ... at [patrons homebranch] since ...". 4. Apply this patch. 5. Repeat steps 2 and 3. => Notice should now read: "Item ... has been on hold for ... at [holds pick up branch] since ...". Sponsored-by: Koha-Suomi Oy Signed-off-by: Axelle Clarisse Signed-off-by: Katrin Fischer --- C4/Circulation.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 6faf53add9..1eacce10ec 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1189,7 +1189,7 @@ sub CanBookBeIssued { $needsconfirmation{'ressurname'} = $patron->surname; $needsconfirmation{'rescardnumber'} = $patron->cardnumber; $needsconfirmation{'resborrowernumber'} = $patron->borrowernumber; - $needsconfirmation{'resbranchcode'} = $patron->branchcode; + $needsconfirmation{'resbranchcode'} = $res->{branchcode}; $needsconfirmation{'resreservedate'} = $res->{reservedate}; $needsconfirmation{'reserve_id'} = $res->{reserve_id}; } @@ -1200,7 +1200,7 @@ sub CanBookBeIssued { $needsconfirmation{'ressurname'} = $patron->surname; $needsconfirmation{'rescardnumber'} = $patron->cardnumber; $needsconfirmation{'resborrowernumber'} = $patron->borrowernumber; - $needsconfirmation{'resbranchcode'} = $patron->branchcode; + $needsconfirmation{'resbranchcode'} = $res->{branchcode}; $needsconfirmation{'resreservedate'} = $res->{reservedate}; $needsconfirmation{'reserve_id'} = $res->{reserve_id}; } @@ -1211,7 +1211,7 @@ sub CanBookBeIssued { $needsconfirmation{'ressurname'} = $patron->surname; $needsconfirmation{'rescardnumber'} = $patron->cardnumber; $needsconfirmation{'resborrowernumber'} = $patron->borrowernumber; - $needsconfirmation{'resbranchcode'} = $patron->branchcode; + $needsconfirmation{'resbranchcode'} = $res->{branchcode}; $needsconfirmation{'resreservedate'} = $res->{reservedate}; $needsconfirmation{'reserve_id'} = $res->{reserve_id}; } -- 2.30.2