This commit is contained in:
2021-05-13 19:47:56 +00:00
parent af8a1b8aef
commit 5d670daaab

View File

@@ -414,11 +414,33 @@ namespace AyaNova.Biz
{ {
//contract has changed, update entire graph pricing and potentially response time stuff as well here now //contract has changed, update entire graph pricing and potentially response time stuff as well here now
//iterate graph calling *SetListPrice on each item //iterate graph calling *SetListPrice on each item
var wo = await WorkOrderGetAsync(woId, false, false); var wo = await ct.WorkOrder
.Include(s => s.States)
.Include(w => w.Items.OrderBy(item => item.Sequence))
.ThenInclude(wi => wi.Expenses)
.Include(w => w.Items)
.ThenInclude(wi => wi.Labors)
.Include(w => w.Items)
.ThenInclude(wi => wi.Loans)
.Include(w => w.Items)
.ThenInclude(wi => wi.Parts)
.Include(w => w.Items)
.ThenInclude(wi => wi.PartRequests)
.Include(w => w.Items)
.ThenInclude(wi => wi.ScheduledUsers)
.Include(w => w.Items)
.ThenInclude(wi => wi.Tasks)
.Include(w => w.Items)
.ThenInclude(wi => wi.Travels)
.Include(w => w.Items)
.ThenInclude(wi => wi.Units)
.Include(w => w.Items)
.ThenInclude(wi => wi.OutsideServices)
.SingleOrDefaultAsync(z => z.Id == woId);
foreach (WorkOrderItem wi in wo.Items) foreach (WorkOrderItem wi in wo.Items)
{ {
foreach (WorkOrderItemLabor o in wi.Labors) foreach (WorkOrderItemLabor o in wi.Labors)
LaborSetPrice(o, mContractInEffect); await LaborSetPrice(o, mContractInEffect);
foreach (WorkOrderItemTravel o in wi.Travels) foreach (WorkOrderItemTravel o in wi.Travels)
TravelSetListPrice(o, mContractInEffect); TravelSetListPrice(o, mContractInEffect);
foreach (WorkOrderItemPart o in wi.Parts) foreach (WorkOrderItemPart o in wi.Parts)