From e8182991804b591dc1730e46da343495af377d2f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 23 Sep 2015 10:44:20 -0400 Subject: [PATCH] Bug 14883: Librarians are not warned if patron is restricted when placing holds MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Librarians should be warned that a patron is restricted when placing holds, as they are warned that a patron's acount has expired. Test Plan: 1) Apply this patch 2) Add a restriction for a patron 3) Attempt to place a hold for that patron 4) Note the notice at the top notifying you that the patron is restricted Works as expected. Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 4 ++++ reserve/request.pl | 2 ++ 2 files changed, 6 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index d2517526ee..fd058879c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -333,6 +333,10 @@ function checkMultiHold() {
  • [% borrowerfirstname %] [% borrowersurname %]'s account has expired
  • [% END %] + [% IF restricted %] +
  • [% borrowerfirstname %] [% borrowersurname %] has restrictions
  • + [% END %] + [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
  • [% borrowerfirstname %] [% borrowersurname %] owes [% amount_outstanding | format('%.2f') %]
  • [% END %] diff --git a/reserve/request.pl b/reserve/request.pl index fefe4b0d01..4544ad283f 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -44,6 +44,7 @@ use C4::Utils::DataTables::Members; use C4::Members; use C4::Search; # enabled_staff_search_views use Koha::DateUtils; +use Koha::Borrower::Debarments qw(IsDebarred); my $dbh = C4::Context->dbh; my $sth; @@ -176,6 +177,7 @@ if ($borrowernumber_hold && !$action) { diffbranch => $diffbranch, messages => $messages, warnings => $warnings, + restricted => IsDebarred($borrowerinfo->{'borrowernumber'}), amount_outstanding => GetMemberAccountRecords($borrowerinfo->{borrowernumber}), ); } -- 2.20.1