Bug 33664: Add ability to cancel order lines in closed baskets
authorKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 28 Jul 2023 15:39:38 +0000 (15:39 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 1 Nov 2023 20:23:12 +0000 (17:23 -0300)
commit9c4cd7380ef358fef0953e4d861cf5a50aff3e83
tree83c23e78dff107ba5b4a1e0148493f90739251a3
parent508d55eb7bd7b7d8e1c2ec1f455c5181fd1d2800
Bug 33664: Add ability to cancel order lines in closed baskets

At the moment it's only possible to cancel order lines while the
basket is still open or from the pending orders page during processing
a shipment. The latter requires you to add a shipment and fake an
invoice. To make things easier we want to optionally allow cancelling
order lines in closed baskets from the basket summary page.

Before applying the patch:

1) Set up data
* Create a new basket
* Create a few order lines, at least 3
* Close the basket
* Receive shipment and receive one order line

2) Verify current behaviour
* On basket summary page: you cannot cancel while the basket is closed
* On the pending orders page you can cancel

Apply patch, run database update, restart_all

3) Verify new behaviour
* Verify that nothing has changed on pending orders and basket summary
* Switch new system preference CancelOrdersInClosedBaskets to "Allow"
* Verify that pending orders hasn't changed a bit
* Verify that you now can cancel your order lines in the closed basket
  Exception: the received order line should not be cancellable

Test anything else that you think might make sense ;)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug_33664_CancelOrdersInClosedBaskets.pl [new file with mode: 0755]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref