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:
parent
d5d4501290
commit
8cb24d6584
1 changed files with 14 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue