This commit is contained in:
2021-03-08 18:15:00 +00:00
parent 82562e5bb7
commit 48bebf0990
3 changed files with 12 additions and 2 deletions

View File

@@ -296,6 +296,9 @@ namespace AyaNova.Biz
} }
} }
if (proposedObj.ContractId != null)
if (proposedObj.ContractExpires == null)
AddError(ApiErrorCode.VALIDATION_REQUIRED, "ContractExpires");
if (proposedObj.BillHeadOffice && (proposedObj.HeadOfficeId == null || proposedObj.HeadOfficeId == 0)) if (proposedObj.BillHeadOffice && (proposedObj.HeadOfficeId == null || proposedObj.HeadOfficeId == 0))
{ {

View File

@@ -280,6 +280,9 @@ namespace AyaNova.Biz
} }
} }
if (proposedObj.ContractId != null)
if (proposedObj.ContractExpires == null)
AddError(ApiErrorCode.VALIDATION_REQUIRED, "ContractExpires");
//Any form customizations to validate? //Any form customizations to validate?
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == AyaType.HeadOffice.ToString()); var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == AyaType.HeadOffice.ToString());

View File

@@ -257,6 +257,10 @@ namespace AyaNova.Biz
} }
} }
if (proposedObj.ContractId != null)
if (proposedObj.ContractExpires == null)
AddError(ApiErrorCode.VALIDATION_REQUIRED, "ContractExpires");
//Any form customizations to validate? //Any form customizations to validate?
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == AyaType.Unit.ToString()); var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == AyaType.Unit.ToString());
if (FormCustomization != null) if (FormCustomization != null)