bug 2000 - changes to TooMany()
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 20 Jun 2008 13:11:20 +0000 (08:11 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 20 Jun 2008 13:19:08 +0000 (08:19 -0500)
commit211defee5286228e9634a25184b40e5025092cbd
tree60540d81cf77d4280128a771777a332ecdcc8ad8
parent95889857c79aa5293911c95556740e201edab75e
bug 2000 - changes to TooMany()

The C4::Circulation::TooMany() function, which determines
if a patron is at the maximum loan limit, has been
changed to work as follows:

1. Checks the issuing rule that would apply to the
   prospective loan to see if a loan limit (maxissueqty)
   has been set.
2. Counts the number of loans that the patron has
   that would fall under that loan rule.

IMPORTANT: that means that if a specific loan rule
exists for the branch, patron category, and item type
in question, *only* that rule's maxissueqty will be
checked here - it will not go on to check whether
a less specific rule has a lower loan limit.

3. If adding one more loan would bring that count
   over the limit, returns a "too many" error.
4. If the loan hasn't exceeded a specific limit, checks
   whether a branch/patron category circ rule has
   specified a loan limit, regardless of item type.
   If the patron has already reached *that* limit, returns
   the "too many" error.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Circulation.pm