diff --git a/WIP Changelog.txt b/WIP Changelog.txt index e96b546..405d951 100644 --- a/WIP Changelog.txt +++ b/WIP Changelog.txt @@ -1,9 +1,6 @@ New Features: -- Implemented the new vehicle groupings by MPI. -- Implemented new model based group detection to provide more accurate groupings than relying solely on the estimating system. * -- Added group verification to disable alerts and track whether a grouping has already been reviewed and confirmed. - +- Bug Fixes: -- Updated ignore logic for recycled glass. - -* Please send feedback on the model groupings if you notice any issues to support@thinkimex.com. \ No newline at end of file +- Updated rare bug in vehicle age calculation. +- Improved wheel repair calculation logic. +- Improved $0 price recognition for Aftermarket and Recycled parts. \ No newline at end of file diff --git a/electron/changelog.json b/electron/changelog.json index 3c2e185..fbb6ab8 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -43,5 +43,10 @@ "title": "Release Notes for 1.0.17", "date": "02/17/2021", "notes": "New Features: \n- Implemented the new vehicle groupings by MPI.\n- Implemented new model based group detection to provide more accurate groupings than relying solely on the estimating system. *\n- Added group verification to disable alerts and track whether a grouping has already been reviewed and confirmed.\n\nBug Fixes: \n- Updated ignore logic for recycled glass.\n\n* Please send feedback on the model groupings if you notice any issues to support@thinkimex.com. " + }, + "1.0.18": { + "title": "Release Notes for 1.0.18", + "date": "04/15/2021", + "notes": "Bug Fixes: \n- Updated rare bug in vehicle age calculation.\n- Improved wheel repair calculation logic.\n- Improved $0 price recognition for Aftermarket and Recycled parts." } } diff --git a/electron/decoder/decoder.js b/electron/decoder/decoder.js index 06fa9ca..e8d022e 100644 --- a/electron/decoder/decoder.js +++ b/electron/decoder/decoder.js @@ -291,7 +291,7 @@ async function DecodeLinFile(extensionlessFilePath) { "LINE_DESC", "PART_TYPE", // "PART_DESCJ", - + "PRT_DSMK_M", "OEM_PARTNO", // "PRICE_INC", // "ALT_PART_I", @@ -306,7 +306,7 @@ async function DecodeLinFile(extensionlessFilePath) { // "ALT_OVERRD", // "ALT_PARTM", // "PRT_DSMK_P", - // "PRT_DSMK_M", + // "MOD_LBR_TY", // "DB_HRS", // "MOD_LB_HRS", @@ -385,6 +385,17 @@ async function DecodeLinFile(extensionlessFilePath) { // jobline.ignore = true; // } + //Wheel Repair Pricing PRS-82 + if ( + jobline.part_type === "PAN" && + jobline.line_desc.toLowerCase().includes("wheel") && + Math.abs(jobline.prt_dsmk_m) === + Math.round((jobline.act_price / 2) * 100) / 100 + ) { + log.info(`Jobline '${jobline.line_desc}' ignored due to wheel repair.`); + jobline.ignore = true; + } + //RPS-39 - OEM ON OEM SAVINGS if ( jobline.part_type === "PAN" && @@ -393,6 +404,16 @@ async function DecodeLinFile(extensionlessFilePath) { jobline.db_price = jobline.act_price; } + //$0DB price for aftermarket and recycled parts. RPS-83 + //Norm to double check. + if ( + (jobline.part_type === "PAA" || jobline.part_type === "PAL") && + jobline.db_price === 0 && + jobline.db_price !== jobline.act_price + ) { + jobline.db_price = jobline.act_price; + } + // if ( // !!jobline.db_price && // jobline.db_price > 0 && @@ -442,6 +463,7 @@ async function DecodeLinFile(extensionlessFilePath) { jobline.ignore = false; } + delete jobline.prt_dsmk_m; //Delete price markup for wheel repair delete jobline.glass_flag; delete jobline.price_j; return jobline; diff --git a/package.json b/package.json index 6be2e81..468edee 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "ImEX RPS", "author": "ImEX Systems Inc. ", "description": "ImEX RPS", - "version": "1.0.17", + "version": "1.0.18", "main": "electron/main.js", "homepage": "./", "dependencies": { diff --git a/src/components/molecules/reporting-jobs-list/reporting-jobs-list.molecule.jsx b/src/components/molecules/reporting-jobs-list/reporting-jobs-list.molecule.jsx index 3ad3e41..4400046 100644 --- a/src/components/molecules/reporting-jobs-list/reporting-jobs-list.molecule.jsx +++ b/src/components/molecules/reporting-jobs-list/reporting-jobs-list.molecule.jsx @@ -1,4 +1,4 @@ -import { Input, Table, Checkbox } from "antd"; +import { Input, Table } from "antd"; import moment from "moment"; import React, { useState } from "react"; import { connect } from "react-redux"; @@ -177,7 +177,7 @@ export function ReportingJobsListMolecule({ Totals - + {`${data.length} record(s)`} diff --git a/src/ipc/ipc-estimate-utils.js b/src/ipc/ipc-estimate-utils.js index cc2015a..28284a1 100644 --- a/src/ipc/ipc-estimate-utils.js +++ b/src/ipc/ipc-estimate-utils.js @@ -19,9 +19,10 @@ const { logger } = window; export function CalculateVehicleAge(job) { const parsedYr = parseInt(job.v_model_yr); - let ret = - moment(job.close_date || new Date()).year() - - (parsedYr >= 0 ? 2000 + parsedYr : 1900 + parsedYr); + const vehicleYr = + moment().year() - 2000 > parsedYr ? 2000 + parsedYr : 1900 + parsedYr; + + let ret = moment(job.close_date || new Date()).year() - vehicleYr; if (ret < 0) ret = 0;