From 9dffb638e8fd54e89170633cf09989685bfd248c 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 Signed-off-by: Tomas Cohen Arazi (cherry picked from commit be8a3ee8304d305a3f684a435a366d5b9ea69b27) Signed-off-by: Matt Blenkinsop --- C4/Circulation.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 8c6eb37c04..fa9879cc4b 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.39.5