[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6355: Correct GetLateOrders so it ignores cancelled orders

Katrin Fischer Katrin.Fischer.83 at web.de
Sat May 21 23:16:43 CEST 2011


From: Frédérick Capovilla <frederick.capovilla at sys-tech.net>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>

Testing plan copied from bug:
- Create a new basket for a bookseller
- Create two new order in this basket. The orders must have a price or else
they won't be shown in the "Late orders" report.
- Delete one of the two orders.
- Close the basket
- Check for late orders and use "0 days ago" as a filter date.
- The deleted item appears in the report.
---
 C4/Acquisition.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm
index e431bd2..59493cb 100644
--- a/C4/Acquisition.pm
+++ b/C4/Acquisition.pm
@@ -1434,6 +1434,7 @@ sub GetLateOrders {
             OR datereceived IS NULL
             OR aqorders.quantityreceived < aqorders.quantity
         )
+        AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00')
     ";
     my $having = "";
     if ($dbdriver eq "mysql") {
-- 
1.7.4.1



More information about the Koha-patches mailing list