From a5233793f48a301309a89c9f24ca2718d8d4319c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 3 Mar 2010 09:39:13 -0500 Subject: [PATCH] BugFix 4036 - Two conditions missing from circ template messages This patch adds the messages for the two missing conditions: USERBLOCKEDOVERDUE and USERBLOCKEDREMAINING. In addition, a new system preference, AllowIssuingForPatronsWithOverdues has been added to disable the blocking of patrons with overdue items. --- C4/Members.pm | 5 +++++ .../en/modules/admin/preferences/circulation.pref | 6 ++++++ .../prog/en/modules/circ/circulation.tmpl | 9 +++++++++ 3 files changed, 20 insertions(+), 0 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 98adc27..2d2846c 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -594,6 +594,11 @@ return : sub IsMemberBlocked { my $borrowernumber = shift; my $dbh = C4::Context->dbh; + + if ( C4::Context->preference('AllowIssuingForPatronsWithOverdues') ) { + return 0; + } + # if he have late issues my $sth = $dbh->prepare( "SELECT COUNT(*) as latedocs diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 10b3b22..9c2a5a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -73,6 +73,12 @@ Circulation: no: "Don't allow" - staff to override and check out items that are marked as not for loan. - + - pref: AllowIssuingForPatronsWithOverdues + choices: + yes: Allow + no: "Don't allow" + - patrons with overdue items to check out new items. + - - pref: AllowRenewalLimitOverride choices: yes: Allow diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl index d7a70fe..e6f08ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -337,6 +337,15 @@ function refocus(calendar) {
  • This item belongs to and cannot be issued from this location.
  • + + +
  • Patron has had overdue items and is blocked for day(s).
  • + + + +
  • Patron has overdue item(s).
  • + + -- 1.5.6.5