From 8b6d71cadc6e104d39292e90c2c5608f19700b53 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 20 Mar 2020 10:13:04 +0000 Subject: [PATCH] Bug 22569: Refine GetTransfersFromTo to filter out unsent transfers GetTransfersFromTo is used solely by the transferstorecieve page which assumes items have already been sent. With the introduction of daterequested we allow for a state where a transfer has been scheduled but not yet sent (See stockrotation for such a case) and so we need to filter these transfers out from the transferstorecieve report. Signed-off-by: Kathleen Milne --- C4/Circulation.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 0c3cd5f072..8fd60fccc3 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3376,7 +3376,9 @@ sub GetTransfersFromTo { FROM branchtransfers WHERE frombranch=? AND tobranch=? + AND datesent IS NOT NULL AND datearrived IS NULL + AND datecancelled IS NULL "; my $sth = $dbh->prepare($query); $sth->execute( $frombranch, $tobranch ); -- 2.20.1