From b8d8dd6bd55e8be9e608e476737d094b156c04ab Mon Sep 17 00:00:00 2001 From: Baptiste Date: Wed, 11 Feb 2026 10:56:48 +0100 Subject: [PATCH] Bug 41070: Fix selector in addorderiso validator Steps to reproduce, do not apply patch 1 - Go to any record and click save -> marc (Unicode/utf8) 2 - Go to any vendor and add a basket 3 - In your acquisition grid, make sure "barcode" is mandatory 4 - In this basket, create a new order from file, use the generated file and wait for the end of the import. Click on add staged files to basket. 5 - Select the record, make sure no Fund or barcode is filled, neither in first or third tab. 6 - Validate: There will be an error due to the missing barcode. If there is another error, fill the missing part of the form. 7 - Apply patch, repeat 6, the error will be due to the missing fund 8 - Select a fund in the first panel -> the error will be due to the missing barcode 9 - Select a fund in the third panel -> the error will be due to the missing barcode Note: the point about the barcode are not relevant for the bug, they are just here to prevent the submission of the form. And avoid repeating steps 4-5. --- koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js b/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js index 366cff95de3..bf89bfe1595 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js +++ b/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js @@ -125,8 +125,8 @@ function checkOrderBudgets() { var unset_funds = 0; var all_budget_id = $("#all_budget_id"); // If we don't have an overarching default set we need to check each selected order - if (!all_budget_id.val()) { - $("fieldset.biblio.rows.order-selected").each(function () { + if ( !all_budget_id.val() ) { + $(".biblio .order-selected fieldset.rows").each(function(){ var default_order_fund = $(this).find("[name='budget_id']"); // For each order we see if budget is set for order if (!default_order_fund.val()) { -- 2.43.0