This commit is contained in:
@@ -157,9 +157,7 @@ namespace AyaNova.Biz
|
||||
AddError(ApiErrorCode.NOT_FOUND);
|
||||
return false;
|
||||
}
|
||||
ValidateCanDelete(dbObject);
|
||||
if (HasErrors)
|
||||
return false;
|
||||
await ValidateCanDeleteAsync(dbObject);
|
||||
if (HasErrors)
|
||||
return false;
|
||||
ct.PurchaseOrder.Remove(dbObject);
|
||||
@@ -206,11 +204,16 @@ namespace AyaNova.Biz
|
||||
public void DigestSearchText(PurchaseOrder obj, Search.SearchIndexProcessObjectParameters searchParams)
|
||||
{
|
||||
if (obj != null)
|
||||
searchParams.AddText(obj.Notes)
|
||||
.AddText(obj.Serial)
|
||||
.AddText(obj.Wiki)
|
||||
.AddText(obj.Tags)
|
||||
.AddCustomFields(obj.CustomFields);
|
||||
searchParams.AddText(obj.Serial)
|
||||
.AddText(obj.Notes)
|
||||
.AddText(obj.VendorMemo)
|
||||
.AddText(obj.ReferenceNumber)
|
||||
.AddText(obj.Text1)
|
||||
.AddText(obj.Text2)
|
||||
.AddText(obj.Serial)
|
||||
.AddText(obj.Wiki)
|
||||
.AddText(obj.Tags)
|
||||
.AddCustomFields(obj.CustomFields);
|
||||
}
|
||||
|
||||
|
||||
@@ -241,9 +244,9 @@ namespace AyaNova.Biz
|
||||
|
||||
}
|
||||
|
||||
private void ValidateCanDelete(PurchaseOrder inObj)
|
||||
private async Task ValidateCanDeleteAsync(PurchaseOrder inObj)
|
||||
{
|
||||
//whatever needs to be check to delete this object
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +264,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//REPORTING
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user