From 01eebf333d09b13a3a575f1eaa7a8704aeddd691 Mon Sep 17 00:00:00 2001 From: =?utf8?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 Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- 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.39.5