From e10b54f52f3f120d5dc2b51da624ce7599857fa9 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=UTF-8 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 --- 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 1a62e91..f6f52cc 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 8ddbb84..fbd5fb6 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.1.0