This commit is contained in:
@@ -59,7 +59,7 @@ namespace AyaNova.Biz
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//CREATE
|
||||
//
|
||||
internal async Task<WorkOrder> WorkOrderCreateAsync(WorkOrder newObject)
|
||||
internal async Task<WorkOrder> WorkOrderCreateAsync(WorkOrder newObject, bool populateViz = true)
|
||||
{
|
||||
await WorkOrderValidateAsync(newObject, null);
|
||||
if (HasErrors)
|
||||
@@ -92,8 +92,8 @@ namespace AyaNova.Biz
|
||||
}
|
||||
await ct.SaveChangesAsync();
|
||||
}
|
||||
|
||||
await WorkOrderPopulateVizFields(newObject, true);//doing this here ahead of notification because notification may require the viz field lookup anyway and afaict no harm in it
|
||||
if (populateViz)
|
||||
await WorkOrderPopulateVizFields(newObject, true);
|
||||
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
||||
return newObject;
|
||||
}
|
||||
@@ -2925,7 +2925,7 @@ namespace AyaNova.Biz
|
||||
if (o.VendorSentViaId != null)
|
||||
o.VendorSentViaViz = await ct.Vendor.AsNoTracking().Where(x => x.Id == o.VendorSentViaId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||
|
||||
TaxCode Tax = null;
|
||||
TaxCode Tax = null;
|
||||
if (o.TaxCodeId != null)
|
||||
Tax = await ct.TaxCode.AsNoTracking().FirstOrDefaultAsync(z => z.Id == o.TaxCodeId);
|
||||
if (Tax != null)
|
||||
@@ -2934,7 +2934,7 @@ namespace AyaNova.Biz
|
||||
|
||||
o.CostViz = o.ShippingCost + o.RepairCost;
|
||||
o.PriceViz = o.ShippingPrice + o.RepairPrice;
|
||||
|
||||
|
||||
//Currently not contract discounted so no further calcs need apply to priceViz
|
||||
|
||||
//Calculate totals and taxes
|
||||
|
||||
Reference in New Issue
Block a user