From 44eb83388928a020812d6fc375d565b0b2d6f9d3 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 13 Dec 2013 23:42:26 +0000 Subject: [PATCH] Bug 8230: (follow-up) repair regression on order search This patch repairs a regression introduced by the main patch where it became impossible to search for cancelled orders from the advanced order search form. This patch also tweaks the wording on the order status drop-down on the order search form to clarify that the default status filter is orders that have any status except cancelled. To test: [1] Before applying this patch, perform an advanced order search (acqui/histsearch.pl) for orders with status cancelled. Observe that no hits are returned. [2] Apply the patch and run the search again. This time, the cancelled orders should be returned. Signed-off-by: Galen Charlton --- C4/Acquisition.pm | 5 +++-- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index cf7e7b7f92..c904c43387 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2241,8 +2241,9 @@ sub GetHistory { $query .= " WHERE 1 "; - $query .= " AND (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') " - if not $get_canceled_order or ( defined $orderstatus and $orderstatus ne 'cancelled' ); + unless ($get_canceled_order or (defined $orderstatus and $orderstatus eq 'cancelled')) { + $query .= " AND (datecancellationprinted is NULL or datecancellationprinted='0000-00-00') "; + } my @query_params = (); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt index 54d19d08c3..56451ac443 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -52,7 +52,7 @@