From 56dde20a4be8630873358c1d0c752a336ee8732e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 2 Oct 2013 09:58:14 +0200 Subject: [PATCH] [PASSED QA] Bug 5336: Multiple QA fixes - add a message if the search returns no result - keep selected values if the search returns no result (for fund and order status) - remove plurals in order status - move the order status column in the search results table Signed-off-by: Katrin Fischer Passes all tests and QA script. New tests also pass: t/db_dependent/Acquisition/close_reopen_basket.t 1) Database update - I end up with too many partials. My test cases: - New orders, basket still open OK Expected: new, Result: partial - Ordered orders, basket and basketgroup closed OK Expected: ordered, Result: partial - Partially received orders OK Expected: partial/complete, Result: partial/complete - Received orders OK: Expected: complete, Result: complete - Cancelled orders * cancelled from open basket before order OK: Expected: cancelled, Result: cancelled * cancelled from closed basket before receive OK: Expected: cancelled, Result: cancelled All aqorders where updated with the correct status. I have saved my 'pre-updatedatabase' and can repeat the test anytime you have a follow up. 2) Testing search functionality a) Order search - result list Order search shows a new column, I think it would be a bit better if the status there was singular instead of plural - new order, partially received order etc. - maybe we could even leave out the 'order'? (minor) The column seems a bit lost in the middle, not sure where it would make more sense (just saying) b) Order search - advanced search form The advanced search form now shows a new filter: Order status All new status can be searched. - an "empty" search will find all but cancelled orders - searching for cancelled orders works correctly and shows results Search works correctly, no regressions found. If no result is found a message is shown. All search input is kept, so you can modify your search terms easily. 3) Testing setting of status after applying the patch a) Create a new order with 2 items - status is new. OK b) Close the basket - status is ordered. OK c) Receive both items - status is completed. OK d) Undo receipt - status is ordered. OK e) Receive only 1 item - order is split up into 2 orders: - status is partial OK - status is completed OK f) Undo receipt of received item - order is combined into 1 again - status is ordered OK! g) Receive only 1 item again - status ordered/partial. h) Delete order. - status is completed - status is cancelled OK! i) Undo receipt of 1 item again. Refresh page. This results in the following behaviour, that has been reported as bug 10984. After refreshing the page follow message is shown: Cannot cancel receipt. Possible reasons : - The order line you trying to cancel was created from a partial receipt of another order line which is already received. Try to cancel this one first and retry. - The order line you trying to cancel was created from a partial receipt of another order line which has been deleted. Cancellation is not possible. BUT: The receipt is undone, but you are left with a line with 2 items, a cancellation date and the status ordered. Because of the cancellation date the order is not visible in pending orders. The status is correct - so I feel this should not stop this patch. --- acqui/histsearch.pl | 3 + .../prog/en/modules/acqui/histsearch.tt | 67 ++++++++++++++------ 2 files changed, 52 insertions(+), 18 deletions(-) diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index e9e4009..4e152e9 100755 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -149,7 +149,10 @@ $template->param( basketgroupname => $basketgroupname, from_placed_on => $from_date, to_placed_on => $to_date, + orderstatus => $orderstatus, + budget_id => $budget, bp_loop => $bp_loop, + search_done => $do_search, debug => $debug || $input->param('debug') || 0, uc(C4::Context->preference("marcflavour")) => 1 ); 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 fe6623b..54d19d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt @@ -51,12 +51,36 @@
  • @@ -66,7 +90,11 @@ [% FOREACH bp_loo IN bp_loop %] [% FOREACH h_loo IN bp_loo.hierarchy %] + [% IF h_loo.budget_id == budget_id %] + [% END %] @@ -94,6 +122,7 @@ Order line (parent) + Status Basket Basket group Invoice number @@ -101,7 +130,6 @@ Vendor Placed on Received on - Status Quantity received Pending order Unit cost @@ -115,6 +143,15 @@ [% order.ordernumber %] [% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber %])[% END %] + + [% SWITCH order.orderstatus %] + [% CASE 'new' %]New + [% CASE 'ordered' %]Pending + [% CASE 'partial' %]Partially received + [% CASE 'complete' %]Received + [% CASE 'cancelled' %]Cancelled + [% END %] + [% order.basketname %] ([% order.basketno %]) [% IF ( order.basketgroupid ) %] @@ -140,15 +177,6 @@ [% order.datereceived | $KohaDates %] [% END %] - - [% SWITCH order.orderstatus %] - [% CASE 'new' %]New orders - [% CASE 'ordered' %]Pending orders - [% CASE 'partial' %]Partially received orders - [% CASE 'complete' %]Received orders - [% CASE 'cancelled' %]Cancelled orders - [% END %] - [% order.quantityreceived %] [% order.quantity %] [% order.ecost %] @@ -156,8 +184,11 @@ [% END %] - - [% ELSE %][% END %] + + + [% ELSIF search_done %] + There is no order for this search. + [% END %] -- 1.7.9.5