From bb8360d7650c8db12f954d126253bb8f573003ca Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 14 Oct 2021 12:05:08 +0100 Subject: [PATCH] Bug 29234: Transit on checking Signed-off-by: Lisette Scheer Signed-off-by: Nick Clemens --- C4/Circulation.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index e190019ae1..89c9239fbd 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2293,8 +2293,15 @@ sub AddReturn { $validTransfer = 1 if $transfer->reason eq 'Reserve'; } else { - $messages->{'WasTransfered'} = $transfer->tobranch; $messages->{'TransferTrigger'} = $transfer->reason; + if ( $transfer->frombranch eq $branch ) { + $transfer->transit; + $messages->{'WasTransfered'} = $transfer->tobranch; + } + else { + $messages->{'WrongTransfer'} = $transfer->tobranch; + $messages->{'WrongTransferItem'} = $item->itemnumber; + } } } } -- 2.30.2