From 193323b9fb3aefbccd84c392790597aa8764ec8a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 2 Jul 2021 11:07:46 -0400 Subject: [PATCH] Bug 26282: Update Holds to pull --- circ/pendingreserves.pl | 23 ++++++++++++------- .../prog/en/modules/circ/pendingreserves.tt | 10 ++++++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 23124bd9aa..c21f1ba442 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -296,15 +296,22 @@ foreach my $bibnum ( @biblionumbers ){ push @holds_info, $hold_info; } +my $cancel_notify_templates = Koha::Notice::Templates->search({ module => 'reserves', code => 'HOLD_CANCELLATION' }); +my $cancel_notice_branches; +while ( my $notice = $cancel_notify_templates->next ) { + $cancel_notice_branches->{$notice->branchcode} = 1; +} + $template->param( - todaysdate => $today, - from => $startdate, - to => $enddate, - holds_info => \@holds_info, - "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, - HoldsToPullStartDate => C4::Context->preference('HoldsToPullStartDate') || PULL_INTERVAL, - HoldsToPullEndDate => C4::Context->preference('ConfirmFutureHolds') || 0, - messages => \@messages, + cancel_notice_branches => $cancel_notice_branches, + todaysdate => $today, + from => $startdate, + to => $enddate, + holds_info => \@holds_info, + HoldsToPullStartDate => C4::Context->preference('HoldsToPullStartDate') || PULL_INTERVAL, + messages => \@messages, + HoldsToPullEndDate => C4::Context->preference('ConfirmFutureHolds') || 0, + "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1, ); output_html_with_http_headers $input, $cookie, $template->output; 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 3a49ee1f22..fff18fe5d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -199,8 +199,14 @@ [% END %] - - + [% IF cancel_notice_branches.size %] + [% SET bc = hold.patron.branchcode %] + [% SET all_bc = "" %] + [% IF cancel_notice_branches.$bc || cancel_notice_branches.$all_bc %] + + + [% END %] + [% END %] [% END %] -- 2.30.1 (Apple Git-130)