This commit is contained in:
2020-12-29 21:59:35 +00:00
parent 68aeb5c66a
commit 623faa25e1

View File

@@ -154,6 +154,22 @@ namespace AyaNova.Biz
return;
}
//valid previous columns?
//either they're all null or none of them are null
if ((proposedObj.LastEntryDate == null
&& proposedObj.LastCurrencyBalance == null
&& proposedObj.LastHoursBalance == null
&& proposedObj.LastIncidentsBalance == null) ||
(proposedObj.LastEntryDate != null
&& proposedObj.LastCurrencyBalance != null
&& proposedObj.LastHoursBalance != null
&& proposedObj.LastIncidentsBalance != null)
)
{
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "generalerror", "Last* entries must be all empty (opening entry) or none of them empty (any later entry)");
return;
}
//Any form customizations to validate?