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

--- Comment #1 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 200498
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200498&action=edit
Bug 42857: Honour arriving transfers when check-in is otherwise blocked

AddReturn() has two early-return paths that fire before the transfer
receive block: a withdrawn item under BlockReturnOfWithdrawnItems, and a
return refused by CanBookBeReturned (AllowReturnToBranch rules). When an
in-transit item arrives at its transfer destination via one of these
paths, the transfer was never received and lingered forever on the
'Transfers to receive' report.

This patch fetches the active transfer once, up front, and computes
whether this check-in completes a transfer (tobranch eq branch, the same
condition the receive block uses). That condition now overrides both
early returns, so flow falls through to the existing receive logic and
the transfer is correctly received. The transfer is reused in the receive
block, removing a duplicate lookup.

Test plan:
1. Set AllowReturnToBranch=homebranch.
2. Transfer an item to a branch that is not its homebranch (in transit).
3. Check it in at that destination branch.
4. Without the patch: check-in refused (Wrongbranch), transfer left open.
   With the patch: transfer received, TransferArrived reported.
5. Repeat with BlockReturnOfWithdrawnItems=1 and a withdrawn item.
6. prove t/db_dependent/Circulation/Returns.t

-- 
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