From e53d3a25886d6e7a6b55d4bc6af23a1d29e0a96f Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 27 Jan 2021 12:05:13 -0800 Subject: [PATCH] Recycled Glass Updates --- electron/changelog.json | 5 +++++ electron/decoder/decoder.js | 34 +++++++++++++++++++++++----------- package.json | 2 +- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/electron/changelog.json b/electron/changelog.json index db50893..d081fad 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -38,5 +38,10 @@ "title": "Release Notes for 1.0.16", "date": "01/12/2021", "notes": "Bug Fixes: \n- Resolved an issue where vehicle age was calculated using an old date." + }, + "1.0.17": { + "title": "Release Notes for 1.0.17", + "date": "TBD", + "notes": "TBD" } } diff --git a/electron/decoder/decoder.js b/electron/decoder/decoder.js index 652d696..06fa9ca 100644 --- a/electron/decoder/decoder.js +++ b/electron/decoder/decoder.js @@ -375,15 +375,15 @@ async function DecodeLinFile(extensionlessFilePath) { //*****TODO LINE**** //Any PAL, Remanufactured, Recycled, Aftermarket, Used, // If DB Price 0, ignore them. - - //RPS-46 Ignore NA Line Items. - if ( - jobline.part_type === "PAN" && - jobline.price_j === true && - jobline.db_price === 0 - ) { - jobline.ignore = true; - } + // if ( + // (jobline.part_type === "PAL" || + // jobline.part_type === "PAM" || + // jobline.part_type === "PAR" || + // jobline.part_type === "PAA") && + // jobline.db_price === 0 + // ) { + // jobline.ignore = true; + // } //RPS-39 - OEM ON OEM SAVINGS if ( @@ -403,6 +403,20 @@ async function DecodeLinFile(extensionlessFilePath) { // jobline.db_price = jobline.act_price; // } + //RPS-46 Ignore NA Line Items. + if ( + jobline.part_type === "PAN" && + jobline.price_j === true && + jobline.db_price === 0 + ) { + jobline.ignore = true; + } + + //Update as per Norm from Rod & Waldo - Only Recycled Glass should count towards RPS, not A/M or OEM + if (jobline.glass_flag && jobline.part_type !== "PAL") { + jobline.ignore = true; + } + //Logic Based Exclusions. if ( !jobline.part_type || @@ -428,8 +442,6 @@ async function DecodeLinFile(extensionlessFilePath) { jobline.ignore = false; } - console.log("jobline", jobline); - delete jobline.glass_flag; delete jobline.price_j; return jobline; diff --git a/package.json b/package.json index 47e0944..796b39c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "ImEX RPS", "author": "ImEX Systems Inc. ", "description": "ImEX RPS", - "version": "1.0.16", + "version": "1.0.17", "main": "electron/main.js", "homepage": "./", "dependencies": {