[Koha-bugs] [Bug 14170] branchtransfers items need to be cancelled when on loan or a waiting reserve

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 11 18:59:14 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14170

--- Comment #5 from Kyle M Hall <kyle at bywatersolutions.com> ---
ModReserveStatus is only called by C4::Circulation::AddReturn, but any open
branch transfers are closed out by the same code:

1918     if ($datesent) {
1919         if ( $tobranch eq $branch ) {
1920             my $sth = C4::Context->dbh->prepare(
1921                 "UPDATE branchtransfers SET datearrived = now() WHERE
itemnumber= ? AND datearrived IS NULL"
1922             );
1923             $sth->execute( $item->{'itemnumber'} );
1924             # if we have a reservation with valid transfer, we can set
it's status to 'W'
1925             ShelfToCart( $item->{'itemnumber'} ) if (
C4::Context->preference("ReturnToShelvingCart") );
1926             C4::Reserves::ModReserveStatus($item->{'itemnumber'}, 'W');
1927         } else {
1928             $messages->{'WrongTransfer'}     = $tobranch;
1929             $messages->{'WrongTransferItem'} = $item->{'itemnumber'};
1930         }
1931         $validTransfert = 1;
1932     } else {
1933         ShelfToCart( $item->{'itemnumber'} ) if (
C4::Context->preference("ReturnToShelvingCart") );
1934     }

ModReserveAffect should probably close out any open transfers in the case it's
called to set an item to waiting.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list