Current functionality: Using Koha 18.11 we are unable to close baskets once all order lines in the basket have been cancelled. We are having to leave baskets open, as if they’re still being worked on. Desired functionality: Allow baskets with all lines cancelled to be closed, and kept for reporting purposes. In the past, if the basket only contained one item ordered and cancelled, we have occasionally deleted the basket at fiscal year end (losing the acquisitions trail), but one of our main vendors has recently gone out of business and we have had to cancel a lot of orders, with all order lines in many baskets cancelled. This will mean we will have to delete the baskets too, maybe at next fiscal year close. Our policy has been to keep all acquisitions trails for a maximum of six years, in keeping with business finance guidance, and we want to keep cancellation information for the same number of years too if possible. (OK, there are no actual financial implications since the orders are cancelled but retention would be useful, allowing librarians to see what they had wanted but couldn’t get, in their book order reports).
Created attachment 111946 [details] [review] Bug 26190: Allow to close a basket with only cancelled order lines At the moment there are several cases, when closing a basket is not possible: - when there are no order lines in it - when there are order lines with uncertain prices - when the basket is marked as a standing order The first case wasn't checked correctly as only pending/received orders would be counted, but not cancelled orders. To test: - Create a basket - Create an order line - Verify the "close this basket" button shows - Cancel the order line - the button disappears - Apply the patch - Verify the button appears and works now - Create another basket - make sure you cannot close it without order lines - Create an order line with uncertain price checked - you cannot close it - Resolve the uncertain price - you can now close the basket.
Created attachment 111990 [details] [review] Bug 26190: Allow to close a basket with only cancelled order lines At the moment there are several cases, when closing a basket is not possible: - when there are no order lines in it - when there are order lines with uncertain prices - when the basket is marked as a standing order The first case wasn't checked correctly as only pending/received orders would be counted, but not cancelled orders. To test: - Create a basket - Create an order line - Verify the "close this basket" button shows - Cancel the order line - the button disappears - Apply the patch - Verify the button appears and works now - Create another basket - make sure you cannot close it without order lines - Create an order line with uncertain price checked - you cannot close it - Resolve the uncertain price - you can now close the basket. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Thx, Severine!
Created attachment 112107 [details] [review] Bug 26190: Allow to close a basket with only cancelled order lines At the moment there are several cases, when closing a basket is not possible: - when there are no order lines in it - when there are order lines with uncertain prices - when the basket is marked as a standing order The first case wasn't checked correctly as only pending/received orders would be counted, but not cancelled orders. To test: - Create a basket - Create an order line - Verify the "close this basket" button shows - Cancel the order line - the button disappears - Apply the patch - Verify the button appears and works now - Create another basket - make sure you cannot close it without order lines - Create an order line with uncertain price checked - you cannot close it - Resolve the uncertain price - you can now close the basket. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Another nice little improvement here, works well.. Thanks for picking it up Katrin Passing QA
Parenthesis would have helped the readability, but it works as it.
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.06
backported to 19.11.x for 19.11.12
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.