From 287e8a619cf67b83d600034b3a34e749f7854e8e Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 11:31:02 -0800 Subject: [PATCH] Removed prevention of negative RPS scores for non-oem parts RPS-72 --- electron/decoder/decoder.js | 18 +++++++++--------- src/util/CalculateJobRps.js | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/electron/decoder/decoder.js b/electron/decoder/decoder.js index e323bd0..c726b90 100644 --- a/electron/decoder/decoder.js +++ b/electron/decoder/decoder.js @@ -389,15 +389,15 @@ async function DecodeLinFile(extensionlessFilePath) { jobline.db_price = jobline.act_price; } - if ( - !!jobline.db_price && - jobline.db_price > 0 && - !!jobline.act_price && - jobline.act_price > jobline.db_price - ) { - //Actual price should never be higher than the DB Price. - jobline.db_price = jobline.act_price; - } + // if ( + // !!jobline.db_price && + // jobline.db_price > 0 && + // !!jobline.act_price && + // jobline.act_price > jobline.db_price + // ) { + // //Actual price should never be higher than the DB Price. + // jobline.db_price = jobline.act_price; + // } //Logic Based Exclusions. if ( diff --git a/src/util/CalculateJobRps.js b/src/util/CalculateJobRps.js index fe8b4ae..606574f 100644 --- a/src/util/CalculateJobRps.js +++ b/src/util/CalculateJobRps.js @@ -13,15 +13,15 @@ export function CalculateJobRpsDollars(job, returnSumActPrice) { val.part_qty || 1 ) ); - if (val.price_diff > 0) { - return acc.add( - Dinero({ amount: Math.round((val.price_diff || 0) * 100) }).multiply( - val.part_qty || 1 - ) - ); - } else { - return acc; - } + // if (val.price_diff > 0) { // + return acc.add( + Dinero({ amount: Math.round((val.price_diff || 0) * 100) }).multiply( + val.part_qty || 1 + ) + ); + // } else { + // return acc; + // } }, Dinero()); return returnSumActPrice ? { actPriceSum, jobRpsDollars } : jobRpsDollars; }