Koha/koha-tmpl/intranet-tmpl/prog/en
Jonathan Druart 9427d44568 Bug 16534: Make CanBookBeIssued test if the issue can be returned
If an issue is already checked out, CanBookBeIssued must check if the
issue can be checked in before processing the return.
In such cases (depending of the AllowReturnToBranch pref), the issue
should not be allowed.

Prior to this patch, the checkin was not done and the checkout failed
with "Duplicate entry '1204321' for key 'itemnumber'". Indeed since bug
14978, there is an uniq key on issues.itemnumber. Before bug 14978 the
issue existed but was hidden (and some weird behaviors certainly
happened!).

To avoid Koha to crash, a check is added to CanBookBeIssued (call to
CanBookBeReturned) and the librarian is not able to process the
checkout.

Test plan:

- Set AllowReturnToBranch to anywhere
- Check an item (homebranch Library 1, holding branch Library 1) out from Library 1
- Check the item out from Library 2
=> Confirm the checkout (should work with and without this patch)

- Set AllowReturnToBranch to holdinbranch ("only the library the item
  was checked out from").
- Check an item (homebranch Library 1, holding branch Library 1) out from Library 1
- Check the item out from Library 2
=> Without this patch, Koha crashed
=> With this patch, you will be warned that the checkin is not possible.

Try other combinations of the AllowReturnToBranch syspref

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-06-24 11:45:00 +00:00
..
data Bug 16608 - Missing entity nbsp in some XML files 2016-06-10 17:40:55 +00:00
includes Bug 16127 - Add discharge menu item to patron toolbar 2016-06-17 15:21:56 +00:00
js Bug 16286 - Use validation plugin when adding or editing patron category 2016-04-29 14:54:14 +00:00
modules Bug 16534: Make CanBookBeIssued test if the issue can be returned 2016-06-24 11:45:00 +00:00
xslt Bug 16608 - Missing entity nbsp in some XML files 2016-06-10 17:40:55 +00:00
columns.def Bug 15373: More changes of Zip to ZIP on intranet 2015-12-30 16:30:35 +00:00