Bugzilla – Attachment 9706 Details for
Bug 8137
Checkout limit for all libraries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8137 - Checkout limit by patron category for all libraries
Bug-8137---Checkout-limit-by-patron-category-for-a.patch (text/plain), 2.63 KB, created by
Kyle M Hall
on 2012-05-22 17:19:34 UTC
(
hide
)
Description:
Bug 8137 - Checkout limit by patron category for all libraries
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-05-22 17:19:34 UTC
Size:
2.63 KB
patch
obsolete
>From 6a6780086a52c4fa855b5a787e04b82d001847ec Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 22 May 2012 13:14:36 -0400 >Subject: [PATCH] Bug 8137 - Checkout limit by patron category for all libraries > >We have a patron category Temporary Adult WTMP. Under "Checkout limit by patron >category for all libraries" the limit is set to 5. This limit is not working. I >was able to check out 7 items to a patron in the WTMP category. > >If the item's home library is LibA, and the borrower has 4 items checked out >whose home library is LibA, than the item will be checked out ( regardless of >how many items are checked out ). If the borrower has 5 items checked out >whose home library is LibA, Koha will indeed warn of too many checkouts. > >I think circcontrol is being mis-used here. It should use the >maxissueqty for the item's home library ( or fallback to the >'all libraries' rule ), but it should still count all issues >from any library >--- > C4/Circulation.pm | 22 ++++++---------------- > 1 files changed, 6 insertions(+), 16 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index c26de76..00a0018 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -433,23 +433,13 @@ sub TooMany { > # Now count total loans against the limit for the branch > my $branch_borrower_circ_rule = GetBranchBorrowerCircRule($branch, $cat_borrower); > if (defined($branch_borrower_circ_rule->{maxissueqty})) { >- my @bind_params = (); >- my $branch_count_query = "SELECT COUNT(*) FROM issues >- JOIN items USING (itemnumber) >- WHERE borrowernumber = ? "; >- push @bind_params, $borrower->{borrowernumber}; >- >- if (C4::Context->preference('CircControl') eq 'PickupLibrary') { >- $branch_count_query .= " AND issues.branchcode = ? "; >- push @bind_params, $branch; >- } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') { >- ; # if branch is the patron's home branch, then count all loans by patron >- } else { >- $branch_count_query .= " AND items.homebranch = ? "; >- push @bind_params, $branch; >- } >+ my $branch_count_query = " >+ SELECT COUNT(*) FROM issues >+ WHERE borrowernumber = ? >+ "; >+ > my $branch_count_sth = $dbh->prepare($branch_count_query); >- $branch_count_sth->execute(@bind_params); >+ $branch_count_sth->execute( $borrower->{borrowernumber} ); > my ($current_loan_count) = $branch_count_sth->fetchrow_array; > > my $max_loans_allowed = $branch_borrower_circ_rule->{maxissueqty}; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8137
:
9705
|
9706
|
11079
|
64703
|
64704
|
64791
|
64891
|
72831
|
72832
|
107207
|
107208
|
107209
|
107459
|
111368
|
111369
|
111370
|
112640
|
113797
|
113882
|
114531
|
114532
|
114533
|
114534
|
116676
|
116677
|
116678
|
116679
|
116680
|
145476
|
145477
|
145478
|
145479
|
145480
|
152040
|
152041
|
152042
|
152043
|
152044
|
152045
|
156316
|
156317
|
156318
|
156319
|
156320
|
156321
|
156322
|
159712
|
162367
|
167208
|
167923
|
168119
|
169084
|
169696
|
169700
|
169727
|
169927
|
169928
|
170411
|
173605
|
173608
|
175837
|
175838
|
177464