From 970e90b3091c1ef54b9d57e6287a112f1977c887 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 Signed-off-by: Henri-Damien LAURENT --- C4/Circulation.pm | 9 +++++++-- .../intranet-tmpl/prog/en/modules/circ/circulation.tmpl | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 3d35050444..b63d11d6ad 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -716,7 +716,7 @@ sub CanBookBeIssued { my ($blocktype, $count) = C4::Members::IsMemberBlocked($borrower->{'borrowernumber'}); if($blocktype == -1){ ## remaining overdue documents - $issuingimpossible{USERBLOCKEDREMAINING} = $count; + $needsconfirmation{USERBLOCKEDREMAINING} = $count; }elsif($blocktype == 1){ ## blocked because of overdue return $issuingimpossible{USERBLOCKEDOVERDUE} = $count; @@ -726,7 +726,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 9df1376bde..f393516bd9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -92,8 +92,9 @@ $.tablesorter.addParser({
  • Item is on reserve for
  • Item ( ) checked out to . Check in and check out?
  • Too many checked out (already checked out / max : )
  • -
  • Overdues
  • -
  • Item not for loan, are you sure you want to check it out ?

    +
  • Overdues
  • +
  • Item not for loan, are you sure you want to check it out ?

    +
  • This patron can't issue this item (issuing rules)
  • -- 2.39.5