@@ -, +, @@ iso2709 file commit b830349f45007629f141a9835e05b95f90ee4b92 Bug 19453: Incorrect jQuery selector for fund drop down validation - Create an order from a staged file - Do not select any funds - Select a specific fund for some of the records - Select a default fund in the last tab --- .../prog/en/modules/acqui/addorderiso2709.tt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -551,15 +551,19 @@ return false; } - var error = 0; - $("select[name='budget_id']").each(function() { - if (!$(this).val()) { - error++; + + if (! $("#all_budget_id").val() ) { + // If there is no default fund + var error = 0; + $("select[name='budget_id']").each(function() { + if (!$(this).val()) { + error++; + } + }); + if ( error > 0 ) { + alert(_("Some budgets are not defined in item records")); + return false; } - }); - if ( error > 0 ) { - alert(_("Some budgets are not defined in item records")); - return false; } return disableUnchecked($(this)); @@ -588,4 +592,4 @@ [% END %] -[% INCLUDE 'intranet-bottom.inc' %] +[% INCLUDE 'intranet-bottom.inc' %] --