From 118d99a14dda70944d85cbb345f2366746f22f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Wed, 22 Jul 2020 15:44:31 +0000 Subject: [PATCH] Bug 12556: Reuse code from Koha::Hold instead of duplicating it --- C4/Reserves.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index c6224c702b..197495a0ca 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -562,10 +562,7 @@ sub CanReserveBeCanceledFromOpac { my $reserve = Koha::Holds->find($reserve_id); return 0 unless $reserve->borrowernumber == $borrowernumber; - return 0 if ( $reserve->found eq 'W' ) or ( $reserve->found eq 'T' ); - - return 1; - + return $reserve->is_cancelable_from_opac; } =head2 GetOtherReserves -- 2.11.0