From c13258ad6f7973138e4a8aef87a8c8c0fe1e183f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 3 Aug 2023 12:26:17 +0000 Subject: [PATCH] Bug 34108: Preserve checked orders after item editing The js that buils the new row after editing expects to receive a value '_checked' indicating if theitem was selected. The 'item' variable used to create the row after edit comes from the api and doesn't include this. We need to inspect the previous html before building the new row to confirm the box wa checked To test: 1 - Create a basket with 'items created on receive' 2 - Add an order line with multiple items to it 3 - Close basket 4 - Receive shipment 5 - Add invoice information 6 - Receive through receive link in the table 7 - Check some items 8 - Click on the "Edit" link and make some change to the item 9 - Save 10 - Checkboxes have disappeared 11 - Cancel receipt 12 - Apply patch 13 - Reload the page 14 - Repeat 7-9 15 - Checkbox is preserved Signed-off-by: Sam Lau Signed-off-by: Michaela Sieber Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 27cf76b4845b966bf67e1f67a1cf144f4e187456) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 724ae61607..a7b9db35e4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -499,6 +499,7 @@ url: '/api/v1/items/'+itemnumber, success: function(item) { var tr = $("#item_"+itemnumber); + item._checked = $(tr).find('input[type="checkbox"]').prop('checked'); tr.html(''); _build_item(item, tr); } -- 2.39.5