From 4c853b0034e20d127a42149dd9d6239867d9df67 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 20 Nov 2019 11:52:04 +0100 Subject: [PATCH] Bug 24013: Fix transferbook if item is checked out Wrong conflict resolution, the following commit 6eade474ed3a84a5ba372a26ac27bf9fb4bd2299 Bug 18276: Remove GetBiblioFromItemNumber - Easy ones restored a previous change from commit 546379cc92b733cb29a0b70247a72c770afdad26 Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls Not that "easy" or "simple"... Test plan: Run the test before and after this patch. Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 74011cafc3..815bc7a0a0 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -319,7 +319,6 @@ sub transferbook { } my $itemnumber = $item->itemnumber; - my $issue = GetOpenIssue($itemnumber); # get branches of book... my $hbr = $item->homebranch; my $fbr = $item->holdingbranch; @@ -345,6 +344,7 @@ sub transferbook { } # check if it is still issued to someone, return it... + my $issue = Koha::Checkouts->find({ itemnumber => $itemnumber }); if ( $issue ) { AddReturn( $barcode, $fbr ); $messages->{'WasReturned'} = $issue->borrowernumber; -- 2.39.5