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 <galen.charlton@liblime.com>
# 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
<li>Too many checked out (already checked out / max : <!-- TMPL_VAR name="TOO_MANY" -->)</li>
<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="PATRON_CANT" --><li>This patron can't issue this item (issuing rules)</li><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="NOT_FOR_LOAN_FORCING" -->
<li>Item is normally not for loan. Check out anyway?</li>
<!-- /TMPL_IF -->