This commit is contained in:
@@ -268,9 +268,16 @@ namespace AyaNova.Biz
|
||||
|
||||
}
|
||||
|
||||
private void ValidateCanDelete(Unit inObj)
|
||||
private async Task ValidateCanDelete(Unit inObj)
|
||||
{
|
||||
//whatever needs to be check to delete this object
|
||||
|
||||
//Can't delete a unit if it's a shadow unit for a loanunit
|
||||
if (await ct.LoanUnit.AnyAsync(z => z.UnitId == inObj.Id))
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", "LT:LoanUnit");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -528,10 +535,10 @@ namespace AyaNova.Biz
|
||||
//MIGRATE_OUTSTANDING need meter reading object to complete unit notification for UnitMeterReadingMultipleExceeded
|
||||
//UnitMeterReadingMultipleExceeded = 26,//* UnitMeterReading object, Created, conditional on DecValue as the Multiple threshold, if passed then notifies
|
||||
//{
|
||||
//first remove any existing, potentially stale notifyevents for this exact object and notifyeventtype
|
||||
//await NotifyEventHelper.ClearPriorEventsForObject(ct, AyaType.Unit, o.Id, NotifyEventType.UnitMeterReadingMultipleExceeded);
|
||||
//first remove any existing, potentially stale notifyevents for this exact object and notifyeventtype
|
||||
//await NotifyEventHelper.ClearPriorEventsForObject(ct, AyaType.Unit, o.Id, NotifyEventType.UnitMeterReadingMultipleExceeded);
|
||||
|
||||
//then check if unit is still metered etc etc and do the rest once the unit meter reading is coded
|
||||
//then check if unit is still metered etc etc and do the rest once the unit meter reading is coded
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user