From d496e3111ab8b396192c77abf5e91fd8295fea0b Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Sat, 18 Apr 2009 22:51:41 +0200 Subject: [PATCH] fix for #988 When a borrower can't issue any book (issuingrules=0), the message should be "this user can't issue book" and not "too many books already issued"wrong message Signed-off-by: Galen Charlton --- C4/Circulation.pm | 7 ++++++- .../intranet-tmpl/prog/en/modules/circ/circulation.tmpl | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c43fbf6416..200bdd2b15 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -738,7 +738,12 @@ sub CanBookBeIssued { # JB34 CHECKS IF BORROWERS DONT HAVE ISSUE TOO MANY BOOKS # my $toomany = TooMany( $borrower, $item->{biblionumber}, $item ); - $needsconfirmation{TOO_MANY} = $toomany if $toomany; + # if TooMany return / 0, then the user has no permission to check out this book + if ($toomany =~ /\/ 0/) { + $needsconfirmation{PATRON_CANT} = 1; + } else { + $needsconfirmation{TOO_MANY} = $toomany if $toomany; + } # # ITEM CHECKING 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 2dc8459da8..03438c30e4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -111,6 +111,7 @@ $.tablesorter.addParser({
  • Too many checked out (already checked out / max : )
  • +
  • This patron can't issue this item (issuing rules)
  • Item is normally not for loan. Check out anyway?
  • -- 2.39.5