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>
(cherry picked from commit 8cb24d6584)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
a1f80ad295
commit
f9cd8a272d
|
|
@ -77,6 +77,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 New Issue