From c406442b94943698f67c8da3247a9b5a86244012 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 23 Sep 2015 10:38:32 -0400 Subject: [PATCH] [Signed-off] Bug 14882 - Librarians are not warned if patron owe more than maxoutstanding when placing holds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a patron owes more than the system preference maxoutstanding in fees and fines, the patron will be unable to place holds via the opac. However, a librarian placing a hold for a patron is not even warned! Test Plan: 1) Apply this patch 2) Set maxoutstanding to 1.00 3) Find a patron owing more than 1.00 4) Attempt to place a hold 5) Note the warning that the patron owes money Works as expected. Signed-off-by: Marc VĂ©ron --- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 5 +++++ reserve/request.pl | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 a6a8f91..1a62e91 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] [% UNLESS ( multi_hold ) %] @@ -332,6 +333,10 @@ function checkMultiHold() {
  • [% borrowerfirstname %] [% borrowersurname %]'s account has expired
  • [% END %] + [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %] +
  • [% borrowerfirstname %] [% borrowersurname %] owes [% amount_outstanding | format('%.2f') %]
  • + [% END %] + [% IF ( diffbranch ) %]
  • Pickup library is different than [% borrowerfirstname %] [% borrowersurname %]'s home library ([% borrower_branchname %] / [% borrower_branchcode %] )
  • [% END %] diff --git a/reserve/request.pl b/reserve/request.pl index 0d82f1c..8ddbb84 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -175,7 +175,8 @@ if ($borrowernumber_hold && !$action) { expiry => $expiry, diffbranch => $diffbranch, messages => $messages, - warnings => $warnings + warnings => $warnings, + amount_outstanding => GetMemberAccountRecords($borrowerinfo->{borrowernumber}), ); } -- 1.7.10.4