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:
Olivier Crouzet 2019-03-11 15:00:23 +01:00 committed by Martin Renvoize
parent a1f80ad295
commit f9cd8a272d
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 14 additions and 0 deletions

View File

@ -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();