case 4224
This commit is contained in:
@@ -6,7 +6,13 @@ The most recent changes are written in the AyaNova manual [hosted on our website
|
||||
|
||||
## 2022
|
||||
|
||||
### AyaNova 8.0.18 (2022-10-25)
|
||||
### AyaNova 8.0.19 (2022-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
|
||||
|
||||
#### Fixed
|
||||
|
||||
- Server: With generated sample data only, not production use, Work order and Quote could potententially not show as locked when set to a locking status
|
||||
|
||||
### AyaNova 8.0.18 (2022-10-27)
|
||||
|
||||
#### Fixed
|
||||
|
||||
|
||||
@@ -5231,7 +5231,7 @@ namespace AyaNova.Biz
|
||||
var wid = await GetQuoteIdFromRelativeAsync(ayaType, id, ct);
|
||||
var stat = await ct.QuoteState.AsNoTracking()
|
||||
.Where(z => z.QuoteId == wid.ParentId)
|
||||
.OrderByDescending(z => z.Created)
|
||||
.OrderByDescending(z => z.Id)//case 4224
|
||||
.Take(1)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace AyaNova.Biz
|
||||
|
||||
var lastMeterReading = await ct.UnitMeterReading.AsNoTracking()
|
||||
.Where(x => x.UnitId == proposedObj.UnitId)
|
||||
.OrderByDescending(z => z.MeterDate)
|
||||
.OrderByDescending(z => z.MeterDate)//note: if in future there is an issue with not being most recent this sb id instead of date but if date is manually updatable then no
|
||||
.Skip(1)//because it's already saved this current reading by the time it gets here
|
||||
.Take(1)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
@@ -7034,7 +7034,7 @@ namespace AyaNova.Biz
|
||||
var wid = await GetWorkOrderIdFromRelativeAsync(ayaType, id, ct);
|
||||
var stat = await ct.WorkOrderState.AsNoTracking()
|
||||
.Where(z => z.WorkOrderId == wid.ParentId)
|
||||
.OrderByDescending(z => z.Created)
|
||||
.OrderByDescending(z => z.Id)//case 4224
|
||||
.Take(1)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
@@ -7047,25 +7047,7 @@ namespace AyaNova.Biz
|
||||
return mCurrentWorkOrderStatus;
|
||||
}
|
||||
|
||||
// internal static async Task<WorkOrderStatus> GetCurrentWorkOrderStatusFromRelatedAsync(AyaType ayaType, long id, AyContext ct)
|
||||
// {
|
||||
// //static method
|
||||
// var wid = await GetWorkOrderIdFromRelativeAsync(ayaType, id, ct);
|
||||
// var stat = await ct.WorkOrderState.AsNoTracking()
|
||||
// .Where(z => z.WorkOrderId == wid.WorkOrderId)
|
||||
// .OrderByDescending(z => z.Created)
|
||||
// .Take(1)
|
||||
// .FirstOrDefaultAsync();
|
||||
|
||||
|
||||
// //no state set yet?
|
||||
// if (stat == null)
|
||||
// { //default
|
||||
// return new WorkOrderStatus() { Id = -1, Locked = false, Completed = false };
|
||||
// }
|
||||
// return await ct.WorkOrderStatus.AsNoTracking().Where(z => z.Id == stat.WorkOrderStatusId).FirstAsync();//this should never not be null
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user