From 28882f89291e8cf513c93f799e91dc6485b5a9d4 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 Signed-off-by: Timothy Alexis Vass --- C4/Reserves.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 4690d97faf..322002d66f 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -567,10 +567,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