This commit is contained in:
@@ -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))
|
||||||
{
|
{
|
||||||
@@ -379,9 +382,9 @@ namespace AyaNova.Biz
|
|||||||
private async Task PopulateVizFields(Customer o)
|
private async Task PopulateVizFields(Customer o)
|
||||||
{
|
{
|
||||||
if (o.HeadOfficeId != null)
|
if (o.HeadOfficeId != null)
|
||||||
o.HeadOfficeViz = await ct.HeadOffice.AsNoTracking().Where(x=>x.Id==o.HeadOfficeId).Select(x => x.Name).FirstOrDefaultAsync();
|
o.HeadOfficeViz = await ct.HeadOffice.AsNoTracking().Where(x => x.Id == o.HeadOfficeId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||||
if (o.ContractId != null)
|
if (o.ContractId != null)
|
||||||
o.ContractViz = await ct.Contract.AsNoTracking().Where(x=>x.Id==o.ContractId).Select(x => x.Name).FirstOrDefaultAsync();
|
o.ContractViz = await ct.Contract.AsNoTracking().Where(x => x.Id == o.ContractId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user