This commit is contained in:
@@ -481,8 +481,9 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//verify that client exists
|
//verify chosen customer exists
|
||||||
//TODO WHEN CLIENT OBJECT MADE if(!ct.Client.any(z))
|
if (!await ct.Customer.AnyAsync(z => z.Id == proposedObj.CustomerId))
|
||||||
|
AddError(ApiErrorCode.NOT_FOUND, "CustomerId");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -495,12 +496,13 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//verify that HeadOfficeId exists
|
//verify chosen HO exists
|
||||||
//TODO WHEN HEADOFFICE OBJECT MADE if(!ct.HeadOffice.any(z))
|
if (!await ct.HeadOffice.AnyAsync(z => z.Id == proposedObj.HeadOfficeId))
|
||||||
|
AddError(ApiErrorCode.NOT_FOUND, "HeadOfficeId");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Validate headoffice type user
|
//Validate subcontractor type user
|
||||||
if (!SeedOrImportRelaxedRulesMode && proposedObj.UserType == UserType.ServiceContractor)
|
if (!SeedOrImportRelaxedRulesMode && proposedObj.UserType == UserType.ServiceContractor)
|
||||||
{
|
{
|
||||||
if (proposedObj.SubVendorId == null || proposedObj.SubVendorId == 0)
|
if (proposedObj.SubVendorId == null || proposedObj.SubVendorId == 0)
|
||||||
@@ -510,7 +512,8 @@ namespace AyaNova.Biz
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//verify that VENDOR SubVendorId exists
|
//verify that VENDOR SubVendorId exists
|
||||||
//TODO WHEN VENDOR OBJECT MADE if(!ct.Vendor.any(z))
|
if (!await ct.Vendor.AnyAsync(z => z.Id == proposedObj.SubVendorId))
|
||||||
|
AddError(ApiErrorCode.NOT_FOUND, "SubVendorId");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user