From 508a5addf15170d32dea0f21e3acf569596db228 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 8 Nov 2019 14:00:43 +0100 Subject: [PATCH] Bug 24002: Incorrect DATE value: '' in C4/Bookseller.pm t/db_dependent/Bookseller.t .. 3/86 DBD::mysql::st execute failed: Incorrect DATE value: '' [for Statement " SELECT DISTINCT aqbasket.booksellerid, aqbooksellers.name FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id WHERE ( datereceived = '' OR datereceived IS NULL OR aqorders.quantityreceived < aqorders.quantity ) AND aqorders.quantity - COALESCE(aqorders.quantityreceived,0) <> 0 AND aqbasket.closedate IS NOT NULL "] at /kohadevbox/koha/C4/Bookseller.pm line 100. Signed-off-by: Martin Renvoize --- C4/Bookseller.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm index dff325ef1f..e5f37f1889 100644 --- a/C4/Bookseller.pm +++ b/C4/Bookseller.pm @@ -66,8 +66,7 @@ sub GetBooksellersWithLateOrders { FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id WHERE - ( datereceived = '' - OR datereceived IS NULL + ( datereceived IS NULL OR aqorders.quantityreceived < aqorders.quantity ) AND aqorders.quantity - COALESCE(aqorders.quantityreceived,0) <> 0 -- 2.39.5