From 16a8009d42206f45a8647ed2f17118a564d93505 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 19 May 2020 13:43:24 -0400 Subject: [PATCH] Bug 25534: Add reason to pendingreserves.pl Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Rebecca Coert --- circ/pendingreserves.pl | 3 ++- .../prog/en/modules/circ/pendingreserves.tt | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 7f2062942a..2886f31e8e 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -56,7 +56,8 @@ my @messages; if ( $op eq 'cancel_reserve' and $reserve_id ) { my $hold = Koha::Holds->find( $reserve_id ); if ( $hold ) { - $hold->cancel; + my $cancellation_reason = $input->param('cancellation-reasion'); + $hold->cancel({ cancellation_reason => $cancellation_reason }); push @messages, { type => 'message', code => 'hold_cancelled' }; } } elsif ( $op =~ m|^mark_as_lost| ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 1510f81ed9..f09d8aae4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -149,10 +149,24 @@
+ + [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] + [% IF hold_cancellation %] +
+ + +
+ [% END %] + [% IF reserveloo.holdingbranch != reserveloo.homebranch %] - + [% ELSE %] - + [% END %]
-- 2.11.0