This commit is contained in:
@@ -4075,11 +4075,23 @@ namespace AyaNova.Biz
|
|||||||
if (calculateTotalsOnly == false)
|
if (calculateTotalsOnly == false)
|
||||||
{
|
{
|
||||||
if (o.PartWarehouseId != 0)
|
if (o.PartWarehouseId != 0)
|
||||||
o.PartWarehouseViz = await ct.PartWarehouse.AsNoTracking().Where(x => x.Id == o.PartWarehouseId).Select(x => x.Name).FirstOrDefaultAsync();
|
{
|
||||||
|
if (!vc.Has("partwarehouse", o.PartWarehouseId))
|
||||||
|
vc.Add(await ct.PartWarehouse.AsNoTracking().Where(x => x.Id == o.PartWarehouseId).Select(x => x.Name).FirstOrDefaultAsync(), "partwarehouse", o.PartWarehouseId);
|
||||||
|
o.PartWarehouseViz = vc.Get("partwarehouse", o.PartWarehouseId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Part part = null;
|
Part part = null;
|
||||||
if (o.PartId != 0)
|
if (o.PartId != 0)
|
||||||
part = await ct.Part.AsNoTracking().FirstOrDefaultAsync(x => x.Id == o.PartId);
|
{
|
||||||
|
if (!oc.Has("part", o.PartId))
|
||||||
|
{
|
||||||
|
part = await ct.Part.AsNoTracking().FirstOrDefaultAsync(x => x.Id == o.PartId);
|
||||||
|
oc.Add(part, "part", o.PartId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
part = (Part)oc.Get("part", o.PartId);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return;//this should never happen but this is insurance in case it does
|
return;//this should never happen but this is insurance in case it does
|
||||||
|
|
||||||
@@ -5147,7 +5159,7 @@ namespace AyaNova.Biz
|
|||||||
vc.Add(await ct.ServiceRate.AsNoTracking().Where(x => x.Id == o.ServiceRateId).Select(x => x.Name).FirstOrDefaultAsync(), "servicerate", o.ServiceRateId);
|
vc.Add(await ct.ServiceRate.AsNoTracking().Where(x => x.Id == o.ServiceRateId).Select(x => x.Name).FirstOrDefaultAsync(), "servicerate", o.ServiceRateId);
|
||||||
}
|
}
|
||||||
o.ServiceRateViz = vc.Get("servicerate", o.ServiceRateId);
|
o.ServiceRateViz = vc.Get("servicerate", o.ServiceRateId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user