From 4ceb5ac4551f5a7177a8749ebd4832d035abc3f4 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 Signed-off-by: Sam Lau Signed-off-by: Pedro Amorim Signed-off-by: Tomas Cohen Arazi --- .../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 8c2676ae95..1ace5c34c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt @@ -479,10 +479,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.39.5