From eb005e767e14e3f81e2d052699c4f236d4b0461f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 30 Jan 2018 11:22:52 -0500 Subject: [PATCH] Bug 19530: Don't update the date arrived for closed transfers Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart (cherry picked from commit 9a6c8f6c1ebca35161c58b2a57015d1baa60d730) Signed-off-by: Fridolin Somers --- C4/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index ce94750bc5..f7678cc13d 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -626,7 +626,7 @@ sub ModItemTransfer { # Remove the 'shelving cart' location status if it is being used. CartToShelf( $itemnumber ) if ( C4::Context->preference("ReturnToShelvingCart") ); - $dbh->do("UPDATE branchtransfers SET datearrived = NOW(), comments = ? WHERE itemnumber = ?", undef, "Canceled, new transfer from $frombranch to $tobranch created", $itemnumber); + $dbh->do("UPDATE branchtransfers SET datearrived = NOW(), comments = ? WHERE itemnumber = ? AND datearrived IS NULL", undef, "Canceled, new transfer from $frombranch to $tobranch created", $itemnumber); #new entry in branchtransfers.... my $sth = $dbh->prepare( -- 2.39.5