This commit is contained in:
@@ -2952,9 +2952,13 @@ namespace AyaNova.Biz
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (proposedObj.LoanUnitId < 1 || !await ct.LoanUnit.AnyAsync(x => x.Id == proposedObj.LoanUnitId))
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "LoanUnitId");
|
||||
|
||||
|
||||
|
||||
//Any form customizations to validate?
|
||||
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == AyaType.WorkOrderItemLoan.ToString());
|
||||
if (FormCustomization != null)
|
||||
@@ -3259,9 +3263,11 @@ namespace AyaNova.Biz
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (proposedObj.UnitId < 1 || !await ct.Unit.AnyAsync(x => x.Id == proposedObj.UnitId))
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "UnitId");
|
||||
|
||||
//Any form customizations to validate?
|
||||
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == AyaType.WorkOrderItemOutsideService.ToString());
|
||||
if (FormCustomization != null)
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace AyaNova.Models
|
||||
public uint Concurrency { get; set; }
|
||||
public string Notes { get; set; }
|
||||
|
||||
[Required]
|
||||
public long UnitId { get; set; }
|
||||
[NotMapped]
|
||||
public string UnitViz { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user