From 79beb833c3d645ef41602ad0349ed42d87640da4 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 --- 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.24.2 (Apple Git-127)