This commit is contained in:
@@ -277,7 +277,7 @@ namespace Sockeye.Biz
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (proposedObj.BillHeadOffice && (proposedObj.HeadOfficeId == null || proposedObj.HeadOfficeId == 0))
|
||||
{
|
||||
@@ -315,14 +315,19 @@ namespace Sockeye.Biz
|
||||
//Workorders and things that you select a Customer for would trigger an error and NOT be deleted automatically
|
||||
//The Mass delete Extension will be used in those cases to clear out all the workorders etc
|
||||
|
||||
|
||||
|
||||
//FOREIGN KEY CHECKS
|
||||
if (await ct.User.AnyAsync(m => m.CustomerId == inObj.Id))
|
||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("User"));
|
||||
|
||||
|
||||
// await Task.CompletedTask;
|
||||
if (await ct.License.AnyAsync(m => m.CustomerId == inObj.Id))
|
||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("License"));
|
||||
|
||||
if (await ct.SubscriptionServer.AnyAsync(m => m.CustomerId == inObj.Id))
|
||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("SubscriptionServer"));
|
||||
|
||||
if (await ct.Purchase.AnyAsync(m => m.CustomerId == inObj.Id))
|
||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("Purchase"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user