From b5ee276f9f9afcc002d7fe122fe22e4cb2f829f6 Mon Sep 17 00:00:00 2001 From: Lyon3 Team Date: Thu, 21 Mar 2013 14:47:43 +0100 Subject: [PATCH] Bug 9824 - Hide basket with no expected items in basqket list by bookseller Before patch you will see in acqui/booksellers.pl all the baskets ever created. After the patch you will see in acqui/booksellers.pl only the basket with expected items. Test plan : * Create a basket with some orders lines You should see this basket in acqui/booksellers.pl * receive or cancel all the line in this basket This basket shouldn't appear any more in acqui/booksellers.pl Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Jared Camins-Esakov (cherry picked from commit a0a6d6e64bca28b4d9bc668f614ed286b07327f9) Signed-off-by: Jared Camins-Esakov (cherry picked from commit e1dbabdb7a3bc0ec92d629b862a077f1b6594fbb) Signed-off-by: Bernardo Gonzalez Kriegel (cherry picked from commit e1dbabdb7a3bc0ec92d629b862a077f1b6594fbb) As this is requested, and applies well in 3.10.x, I push it with it's followups. Signed-off-by: Chris Hall (cherry picked from commit c80b91c3e0114dae1d09a158baa4cc8c81ac62ee) --- C4/Acquisition.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 905b657953..b32f591bdd 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -494,7 +494,8 @@ sub GetBasketsInfosByBookseller { ) AS expected_items FROM aqbasket LEFT JOIN aqorders ON aqorders.basketno = aqbasket.basketno - WHERE booksellerid = ? + WHERE booksellerid = ? AND ( aqorders.quantity > aqorders.quantityreceived OR quantityreceived IS NULL) + AND datecancellationprinted IS NULL GROUP BY aqbasket.basketno }; my $sth = $dbh->prepare($query); -- 2.39.5