From 10f21335dbc67c0c55ada399fe26c567613ed131 Mon Sep 17 00:00:00 2001 From: Laura Escamilla Date: Wed, 24 Apr 2024 15:52:05 +0000 Subject: [PATCH] Bug 36684: Prevent users from cancelling an order if it has uncertain prices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test: 1. Create a basket 1. Add an item to the basket from an existing record 1. When adding the item, under accounting details select “Uncertain price”. Save the item. 2. Notice that under the RRP tax exc. column the price has an “Uncertain” label. Under the ‘Cancel order’ column you also have the ability to “Cancel order” 3. Cancel the order. A new “Cancelled orders” table will appear under the “Orders” table. The item in the “Cancelled orders” table is greyed out and does not show any information regarding the “Uncertain price” label. 4. The basket remains a “problem” basket despite it not having any active items with uncertain prices. 2. Apply the patch and restart_all 3. Create a new basket 1. Add an item to the basket from an existing record 1. When adding the item, under accounting details select “Uncertain price”. Save the item. 2. Notice that under the RRP tax exc. column the price has an “Uncertain” label. 3. Under the ‘Cancel order’ column you now see a message that says, “Can’t cancel order because it contains uncertain prices.” 4. Click on the “Uncertain prices” tab and uncheck the ‘Uncertain’ box. Save and head back to your basket. 5. You are now able to “Cancel order” since the item no longer has an uncertain price. 2. Add a second item to the basket from an existing record. 1. Do not select “Uncertain price”. Save the item. 2. Under the ‘Cancel order’ column you have the ability to “Cancel order” 4. Sign off and have an amazing day! :D --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index fdadf42c66..4cd5c4f82f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -726,7 +726,9 @@ [% IF ( !closedate || Koha.Preference('CancelOrdersInClosedBaskets') ) %] [% IF ( books_loo.orderstatus != "complete") %] - [% IF ( books_loo.left_holds_on_order ) %] + [% IF ( books_loo.uncertainprice ) %] + Can't cancel order because it contains uncertain prices.
+ [% ELSIF ( books_loo.left_holds_on_order ) %] Can't cancel order
[% ELSE %] Cancel order
-- 2.30.2