https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42997

--- Comment #2 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 201543
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201543&action=edit
Bug 42997: Don't let a booking's own checkout block it in check_booking

Koha::Item->check_booking refuses any booking period that starts before
the item's current checkout is due back. That is correct when assessing
a new booking against someone else's loan, but it also fired when the
checkout in question is the booking's own linked loan - making it
impossible to ever move an issued booking's end_date, as any update
would 'clash' with its own checkout.

This patch skips the checkout guard when the checkout's booking_id
matches the booking_id passed for exclusion, i.e. when the checkout
belongs to the very booking being updated. This is a prerequisite for
keeping booking end dates in sync with checkout due dates in this
patchset, and for the booking extension pathway on bug 42790.

Test plan:
1) Run t/db_dependent/Koha/Item.t and confirm the check_booking
   subtest passes, including the two new checkout-related tests

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to