case 4015

This commit is contained in:
2021-11-05 15:27:14 +00:00
parent c36012e89d
commit 3416f91031
6 changed files with 74 additions and 21 deletions

View File

@@ -854,10 +854,10 @@ namespace AyaNova.Biz
//Alert notes
//Customer notes first then others below
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.AlertNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync();
if (!string.IsNullOrWhiteSpace(custInfo.AlertViz))
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { x.AlertNotes, x.TechNotes, x.Name, x.Phone1, x.Phone2, x.Phone3, x.Phone4, x.Phone5, x.EmailAddress }).FirstOrDefaultAsync();
if (!string.IsNullOrWhiteSpace(custInfo.AlertNotes))
{
o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertViz}\n\n";
o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertNotes}\n\n";
}
if (!string.IsNullOrWhiteSpace(custInfo.TechNotes))
@@ -865,7 +865,13 @@ namespace AyaNova.Biz
o.CustomerTechNotesViz = $"{await Translate("CustomerTechNotes")}\n{custInfo.TechNotes}\n\n";
}
o.CustomerViz = custInfo.CustomerViz;
o.CustomerViz = custInfo.Name;
o.CustomerPhone1Viz = custInfo.Phone1;
o.CustomerPhone2Viz = custInfo.Phone2;
o.CustomerPhone3Viz = custInfo.Phone3;
o.CustomerPhone4Viz = custInfo.Phone4;
o.CustomerPhone5Viz = custInfo.Phone5;
o.CustomerEmailAddressViz = custInfo.EmailAddress;
if (o.ProjectId != null)
o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync();
@@ -4654,7 +4660,7 @@ namespace AyaNova.Biz
{
var unitModelInfo = await ct.UnitModel.AsNoTracking().Where(x => x.Id == unitInfo.UnitModelId).Select(x => new { x.Name, x.VendorId }).FirstOrDefaultAsync();
o.UnitModelNameViz = unitModelInfo.Name;
if (unitModelInfo.VendorId != null)
o.UnitModelVendorViz = await ct.Vendor.AsNoTracking().Where(x => x.Id == unitModelInfo.VendorId).Select(x => x.Name).FirstOrDefaultAsync();
@@ -4814,7 +4820,7 @@ namespace AyaNova.Biz
if (o is Quote)
{
Quote dto = new Quote();
CopyObject.Copy(o, dto,"Name");
CopyObject.Copy(o, dto, "Name");
return await QuotePutAsync((Quote)dto);
}
return await QuotePutAsync((Quote)o) as ICoreBizObjectModel;