diff --git a/BodyshopUploader/Utils/Decoder/EstimateDecoder.cs b/BodyshopUploader/Utils/Decoder/EstimateDecoder.cs index 05c4dd1..b0b43cb 100644 --- a/BodyshopUploader/Utils/Decoder/EstimateDecoder.cs +++ b/BodyshopUploader/Utils/Decoder/EstimateDecoder.cs @@ -42,7 +42,7 @@ namespace BodyshopPartner.Utils.Decoder bool ttlSuccess = ParseTtlFile(ref ret, _dir); bool linSuccess = ParseLinFile(ref ret, _dir, system); bool pfpSuccess = ParsePfpFile(ref ret, _dir); - + ret.labor_rate_desc = "EST"; if (!ad1Success || !ad2Success || !vehSuccess || !pfhSuccess || !pflSuccess || !pfmSuccess || !stlSuccess || !ttlSuccess || !linSuccess || !pfpSuccess) return false; return ret; } @@ -219,6 +219,10 @@ namespace BodyshopPartner.Utils.Decoder j.ownr_zip = readValues[93]; j.ownr_ctry = readValues[94]; j.ownr_ph1 = readValues[95]; + if (String.IsNullOrWhiteSpace(j.ownr_ph1.Value)) + { + j.ownr_ph1 = readValues[97]; + } //j.ownr_ph1x = readValues[96]; j.ownr_ph2 = readValues[97]; // j.ownr_ph2x = readValues[98]; @@ -252,6 +256,10 @@ namespace BodyshopPartner.Utils.Decoder ownerRoot.ownr_zip = readValues[93]; ownerRoot.ownr_ctry = readValues[94]; ownerRoot.ownr_ph1 = readValues[95]; + if(String.IsNullOrWhiteSpace(ownerRoot.ownr_ph1.Value)) + { + ownerRoot.ownr_ph1 = readValues[97]; + } ownerRoot.ownr_ph2 = readValues[97]; ownerRoot.ownr_ea = readValues[101]; ownerRoot.shopid = AppMetaData.ActiveShopId; @@ -320,6 +328,10 @@ namespace BodyshopPartner.Utils.Decoder j.ownr_zip = readValues[8]; j.ownr_ctry = readValues[9]; j.ownr_ph1 = readValues[10]; + if (String.IsNullOrWhiteSpace(j.ownr_ph1.Value)) + { + j.ownr_ph1 = readValues[12]; + } //j.ownr_ph1x = readValues[11]; j.ownr_ph2 = readValues[12]; // j.ownr_ph2x = readValues[13]; @@ -340,6 +352,10 @@ namespace BodyshopPartner.Utils.Decoder j.owner.data.ownr_zip = readValues[8]; j.owner.data.ownr_ctry = readValues[9]; j.owner.data.ownr_ph1 = readValues[10]; + if (String.IsNullOrWhiteSpace(j.owner.data.ownr_ph1.Value)) + { + j.owner.data.ownr_ph1 = readValues[12]; + } j.owner.data.ownr_ph2 = readValues[12]; j.owner.data.ownr_ea = readValues[16]; } diff --git a/BodyshopUploader/Utils/DiskScan.cs b/BodyshopUploader/Utils/DiskScan.cs index e7761f4..536fe97 100644 --- a/BodyshopUploader/Utils/DiskScan.cs +++ b/BodyshopUploader/Utils/DiskScan.cs @@ -17,7 +17,7 @@ namespace BodyshopPartner.Utils List EstimatesOnDisk = new List(); List ad1FilePaths = new List(); - Properties.Settings.Default.MonitoringPaths.ForEach(mp => ad1FilePaths.AddRange(Directory.GetFiles(mp, "*.env").ToList())); + Properties.Settings.Default.MonitoringPaths?.ForEach(mp => ad1FilePaths.AddRange(Directory.GetFiles(mp, "*.env").ToList())); await JobProcessingQueue.GetOpCodes();