From 261e30f3e484fe3d49848fb60ea2cc7fbee88885 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 24 Sep 2018 13:33:59 +0100 Subject: [PATCH] Bug 21385: (follow-up) make query consistent The expected items query wasn't consistent with other queries in this module with regards to identifying cancelled orders Signed-off-by: Caroline Cyr La Rose Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit 5e6f4f1f4fb346351dcfc6c580888022641d4b6a) Signed-off-by: Martin Renvoize --- C4/Acquisition.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 002c794ea6..b20b9a15c2 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -700,7 +700,7 @@ sub GetBasketsInfosByBookseller { COUNT(DISTINCT aqorders.biblionumber) AS total_biblios, SUM( IF(aqorders.datereceived IS NULL - AND aqorders.datecancellationprinted IS NULL + AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00') , aqorders.quantity , 0) ) AS expected_items -- 2.39.5