From 597511cf55c1388b824160361888809b04c37e84 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Wed, 2 Aug 2017 17:12:44 +0100 Subject: [PATCH] Bug 19024 Do not unset order cancelled status on basket close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followed the test plan and works as described. Signed-off-by: Dilan Johnpullé --- C4/Acquisition.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index ebbe44b..6929422 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -240,8 +240,10 @@ sub CloseBasket { my $dbh = C4::Context->dbh; $dbh->do('UPDATE aqbasket SET closedate=now() WHERE basketno=?', {}, $basketno ); - $dbh->do( q{UPDATE aqorders SET orderstatus = 'ordered' WHERE basketno = ? AND orderstatus != 'complete'}, - {}, $basketno); + $dbh->do( +q{UPDATE aqorders SET orderstatus = 'ordered' WHERE basketno = ? AND orderstatus NOT IN ( 'completed', 'cancelled')}, + {}, $basketno + ); return; } -- 2.1.4