From 98372c928e581e3c65f94f952e12ff277f564239 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 23 Nov 2022 13:24:12 +0000 Subject: [PATCH] Bug 32335: Allow stock rotation items to be advanced when in transit This patch adjusts the logic so that we check: 1 - If there are less than 2 stages we disable the 'Move to next stage' button 2 - If the item is not in transit, we show move to next normally 3 - If the item is in transit (and there is more than 1 stage) the button is enabled with a note about transfer To test: 1 - Setup a rota with multiple stages 2 - Add an item 3 - Advance to next stage 4 - Observe 'Move to next stage' button is disabled 5 - Check item in at destination 6 - Reload rota - observe 'Move to next stage' is enabled 7 - Apply patch 8 - Click 'Move to next stage' 9 - Note button is not disabled 10 - Hover and confirm note about transit 11 - Click 'Move to next stage' 12 - Checkin item at wrong branch, confirm it is correctly directed to correct stage --- .../intranet-tmpl/prog/en/modules/tools/stockrotation.tt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt index a7f58583ab..c4e264c184 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt @@ -500,10 +500,12 @@ [% in_transit = sritem.item.get_transfer %] - [% IF !in_transit && stages.size > 1 %] + [% IF stages.size < 2 %] + + [% ELSIF !in_transit %] [% ELSE %] - + [% END %] Move to next stage -- 2.30.2