From 3abe0c0379363aa57fdd4857773395917f778a91 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 13 Dec 2022 22:49:47 +0000 Subject: [PATCH] case 4341 --- server/AyaNova/Controllers/CustomerController.cs | 2 -- server/AyaNova/biz/PMBiz.cs | 2 ++ server/AyaNova/biz/PurchaseOrderBiz.cs | 2 ++ server/AyaNova/biz/QuoteBiz.cs | 3 ++- server/AyaNova/biz/WorkOrderBiz.cs | 1 + server/AyaNova/models/PurchaseOrder.cs | 13 +++++++++---- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/server/AyaNova/Controllers/CustomerController.cs b/server/AyaNova/Controllers/CustomerController.cs index 206a8ca9..1da47b36 100644 --- a/server/AyaNova/Controllers/CustomerController.cs +++ b/server/AyaNova/Controllers/CustomerController.cs @@ -230,6 +230,4 @@ namespace AyaNova.Api.Controllers }//eoc - // internal record PostalAddressRecord(string PostAddress, string PostCity, string PostRegion, string PostCountry, string PostCode); - // internal record AddressRecord(string Address, string City, string Region, string Country, decimal? Latitude, decimal? Longitude); }//eons \ No newline at end of file diff --git a/server/AyaNova/biz/PMBiz.cs b/server/AyaNova/biz/PMBiz.cs index 71ae0d12..741709fe 100644 --- a/server/AyaNova/biz/PMBiz.cs +++ b/server/AyaNova/biz/PMBiz.cs @@ -487,6 +487,7 @@ namespace AyaNova.Biz newObj.City = cust.City; newObj.Region = cust.Region; newObj.Country = cust.Country; + newObj.AddressPostal = cust.AddressPostal; newObj.Latitude = cust.Latitude; newObj.Longitude = cust.Longitude; @@ -5270,6 +5271,7 @@ namespace AyaNova.Biz //o.CompleteByDate=?? wo.ContractId = p.ContractId; wo.Country = p.Country; + wo.AddressPostal = p.AddressPostal; wo.CreatedDate = DateTime.UtcNow; wo.CustomerContactName = p.CustomerContactName; wo.CustomerId = p.CustomerId; diff --git a/server/AyaNova/biz/PurchaseOrderBiz.cs b/server/AyaNova/biz/PurchaseOrderBiz.cs index 5c178cb2..20f7ed4c 100644 --- a/server/AyaNova/biz/PurchaseOrderBiz.cs +++ b/server/AyaNova/biz/PurchaseOrderBiz.cs @@ -175,6 +175,7 @@ namespace AyaNova.Biz vc.Add(vnd.City, "vndcity", vid); vc.Add(vnd.Region, "vndregion", vid); vc.Add(vnd.Country, "vndcountry", vid); + vc.Add(vnd.AddressPostal,"vndaddresspostal",vid); vc.Add(vnd.Latitude.ToString(), "vndlat", vid); vc.Add(vnd.Longitude.ToString(), "vndlong", vid); vc.Add(vnd.PostAddress, "vndpostaddr", vid); @@ -201,6 +202,7 @@ namespace AyaNova.Biz po.VendorCityViz = vc.Get("vndcity", vid); po.VendorRegionViz = vc.Get("vndregion", vid); po.VendorCountryViz = vc.Get("vndcountry", vid); + po.VendorAddressPostalViz = vc.Get("vndaddresspostal",vid); po.VendorLatitudeViz = vc.GetAsDecimal("vndlat", vid); po.VendorLongitudeViz = vc.GetAsDecimal("vndlong", vid); po.VendorPostAddressViz = vc.Get("vndpostaddr", vid); diff --git a/server/AyaNova/biz/QuoteBiz.cs b/server/AyaNova/biz/QuoteBiz.cs index c004a040..dec61a39 100644 --- a/server/AyaNova/biz/QuoteBiz.cs +++ b/server/AyaNova/biz/QuoteBiz.cs @@ -174,7 +174,7 @@ namespace AyaNova.Biz //https://docs.microsoft.com/en-us/ef/core/querying/related-data //docs say this will not query twice but will recognize the duplicate woitem bit which is required for multiple grandchild collections return await ct.Quote.AsSplitQuery().AsNoTracking() - .Include(s => s.States.OrderBy(item=> item.Id)) + .Include(s => s.States.OrderBy(item => item.Id)) .Include(w => w.Items.OrderBy(item => item.Sequence)) .ThenInclude(wi => wi.Expenses) .Include(w => w.Items) @@ -461,6 +461,7 @@ namespace AyaNova.Biz newObj.City = cust.City; newObj.Region = cust.Region; newObj.Country = cust.Country; + newObj.AddressPostal = cust.AddressPostal; newObj.Latitude = cust.Latitude; newObj.Longitude = cust.Longitude; diff --git a/server/AyaNova/biz/WorkOrderBiz.cs b/server/AyaNova/biz/WorkOrderBiz.cs index c59a2c25..e9561730 100644 --- a/server/AyaNova/biz/WorkOrderBiz.cs +++ b/server/AyaNova/biz/WorkOrderBiz.cs @@ -572,6 +572,7 @@ namespace AyaNova.Biz newObj.City = cust.City; newObj.Region = cust.Region; newObj.Country = cust.Country; + newObj.AddressPostal = cust.AddressPostal; newObj.Latitude = cust.Latitude; newObj.Longitude = cust.Longitude; diff --git a/server/AyaNova/models/PurchaseOrder.cs b/server/AyaNova/models/PurchaseOrder.cs index b12e9b4b..ee437c77 100644 --- a/server/AyaNova/models/PurchaseOrder.cs +++ b/server/AyaNova/models/PurchaseOrder.cs @@ -44,7 +44,7 @@ namespace AyaNova.Models //VIZ FIELDS - + //POSTAL ADDRESS [NotMapped] public string DropShipToCustomerPostAddressViz { get; set; } @@ -68,7 +68,7 @@ namespace AyaNova.Models public string DropShipToCustomerCountryViz { get; set; } [NotMapped] public string DropShipToCustomerAddressPostalViz { get; set; } - + [NotMapped] public decimal? DropShipToCustomerLatitudeViz { get; set; } [NotMapped] @@ -110,6 +110,11 @@ namespace AyaNova.Models public string VendorRegionViz { get; set; } [NotMapped] public string VendorCountryViz { get; set; } + + [NotMapped] + public string VendorAddressPostalViz { get; set; } + + [NotMapped] public decimal? VendorLatitudeViz { get; set; } [NotMapped] @@ -131,9 +136,9 @@ namespace AyaNova.Models [NotMapped] public string VendorEmailAddressViz { get; set; } - [NotMapped] + [NotMapped] public string VendorAlertNotesViz { get; set; } - [NotMapped] + [NotMapped] public string VendorAccountNumberViz { get; set; }