This commit is contained in:
@@ -2320,8 +2320,10 @@ namespace AyaNova.Biz
|
||||
o.UserViz = await ct.User.AsNoTracking().Where(x => x.Id == o.UserId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||
ServiceRate Rate = null;
|
||||
if (o.ServiceRateId != null)
|
||||
{
|
||||
Rate = await ct.ServiceRate.AsNoTracking().FirstOrDefaultAsync(x => x.Id == o.ServiceRateId);
|
||||
o.ServiceRateViz = Rate.Name;
|
||||
o.ServiceRateViz = Rate.Name;
|
||||
}
|
||||
TaxCode Tax = null;
|
||||
if (o.TaxCodeSaleId != null)
|
||||
Tax = await ct.TaxCode.AsNoTracking().FirstOrDefaultAsync(z => z.Id == o.TaxCodeSaleId);
|
||||
@@ -5577,7 +5579,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
}
|
||||
|
||||
if (proposedObj.UnitId<1 || !await ct.Unit.AnyAsync(x => x.Id == proposedObj.UnitId))
|
||||
if (proposedObj.UnitId < 1 || !await ct.Unit.AnyAsync(x => x.Id == proposedObj.UnitId))
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "UnitId");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user