From 2516158110ade3d76d63704f7029e2e08c63469b Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 6 Dec 2021 08:18:55 -0800 Subject: [PATCH] Add handling of Ownr Co Nm from MCE. --- electron/changelog.json | 4 ++-- electron/decoder/decoder.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/electron/changelog.json b/electron/changelog.json index 95c8587..3e57795 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -86,7 +86,7 @@ }, "1.0.26": { "title": "Release Notes for 1.0.26", - "date": "TBD", - "notes": "New Features: \n- Updated Vehicle categorization lists.\n- Improved N/A/$0 line item detection and calculations." + "date": "12/06/2021", + "notes": "Bug Fix: \n- Improved handling of company names coming from Mitchell Cloud Estimating." } } diff --git a/electron/decoder/decoder.js b/electron/decoder/decoder.js index 79fac55..1985155 100644 --- a/electron/decoder/decoder.js +++ b/electron/decoder/decoder.js @@ -53,7 +53,8 @@ async function DecodeEstimate(filePath, includeFilePathInReturnJob = false) { if (job.OWNR_FN === "" || !job.OWNR_FN) job.OWNR_FN = ad2.CLMT_FN; if (job.OWNR_LN === "" || !job.OWNR_LN) job.OWNR_LN = ad2.CLMT_LN; - + if (job.OWNR_CO_NM) job.OWNR_LN = `${job.OWNR_LN} ${job.OWNR_CO_NM}`; + delete job.OWNR_CO_NM; const accepted_ins_co = store.get("accepted_ins_co"); let returnValue; @@ -183,7 +184,7 @@ async function DecodeAd1File(extensionlessFilePath) { "OWNR_LN", "OWNR_FN", // "OWNR_TITLE", - // "OWNR_CO_NM", + "OWNR_CO_NM", // "OWNR_ADDR1", // "OWNR_ADDR2", // "OWNR_CITY", @@ -446,7 +447,7 @@ async function DecodeLinFile(extensionlessFilePath) { //08/24/21 - Norm to take as action item to determine what the final set of rules were per Derek. // if (jobline.glass_flag && jobline.part_type !== "PAL") { // jobline.ignore = true; - + // } //09/2021 Detect NAGS lines using RegEx for the Part Number @@ -465,7 +466,6 @@ async function DecodeLinFile(extensionlessFilePath) { jobline.db_ref.startsWith("900") || jobline.line_desc.toLowerCase().startsWith("urethane") || jobline.line_desc.toLowerCase().startsWith("w/shield adhesive") || - //jobline.line_desc.toLowerCase().includes("wheel") || Removed as a part of RPS-41 jobline.line_desc.toLowerCase().includes("tire") || jobline.line_desc.toLowerCase().startsWith("hazardous") ||