Bug 18321: Correctly calculate switch_onsite_checkout
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 31 Mar 2017 03:24:09 +0000 (00:24 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Mon, 17 Apr 2017 17:58:37 +0000 (13:58 -0400)
commitf04c5d5a2c549bed54036b726965ccda083def7b
tree44b198d897ebccb2c851e712e5f8b11546ecb94f
parent1c7d283aae0952877b871f486c31cd3f04529222
Bug 18321: Correctly calculate switch_onsite_checkout

Silly error here, the $switch_onsite_checkout is not correctly
calculated, it should not only be set to the value of the syspref, but
meet all the conditions.

Test plan:
Set a circ rule with number of on-site checkout = 2 and number of
checkouts = 2.
Switch on both ConsiderOnSiteCheckoutsAsNormalCheckouts and SwitchOnSiteCheckouts

Do a regular checkout
Do another regular checkout
At this point you have reach the maximum number of checkouts allowed.
Not try another one.
=> Without this patch you will not get the warning
=> With this patch you will see it

Followed test plan, works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Circulation.pm