Bug 20830: Make sure a fund is selected when ordering from a stage file

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Olivier Crouzet 2019-03-11 15:00:23 +01:00 committed by Nick Clemens
parent d5d4501290
commit 8cb24d6584

View file

@ -76,6 +76,20 @@
}
if (! $("#all_budget_id").val() ) {
// If there is no default fund
var error = 0;
$(".selected [name='budget_id']").each(function(){
if (!$(this).val()) {
error++;
}
});
if ( error > 0 ) {
alert(_("Some budgets are not defined in item records"));
return false;
}
}
return disableUnchecked($(this));
});
$('#tabs').tabs();