$0DB Updates, quantity ignore.
This commit is contained in:
@@ -70,10 +70,15 @@ async function DecodeEstimate(filePath, includeFilePathInReturnJob = false) {
|
||||
})`,
|
||||
};
|
||||
} else if (!job.CLM_NO) {
|
||||
log.info("Job ignored. No claim #. " + job.clm_no);
|
||||
log.info("Job ignored. No claim #. ");
|
||||
returnValue = {
|
||||
ERROR: `An unique claim number must be set for all jobs sent to RPS.`,
|
||||
};
|
||||
} else if (job.CLM_NO.match("02$")) {
|
||||
log.info("Job ignored. This is an -02 claim. Claim #. " + job.CLM_NO);
|
||||
returnValue = {
|
||||
ERROR: "Job ignored. This is an -02 claim. Claim #. " + job.CLM_NO,
|
||||
};
|
||||
} else {
|
||||
returnValue = _.transform(job, function (result, val, key) {
|
||||
result[key.toLowerCase()] = val;
|
||||
@@ -361,19 +366,20 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
// Appears you are calculating based on ‘N.A.’ part values in the Mitchell database.
|
||||
// Reminder – if Mitchell DB has $0.00 price updates can be tracked, if it has N.A. it cannot calculate RPS value.
|
||||
|
||||
if (
|
||||
(jobline.db_price === null || jobline.db_price === 0) &&
|
||||
!!jobline.act_price &&
|
||||
jobline.act_price > 0
|
||||
) {
|
||||
// log.info(
|
||||
// "DB Price null/lower than act price",
|
||||
// jobline.line_desc,
|
||||
// jobline.db_price,
|
||||
// jobline.act_price
|
||||
// );
|
||||
jobline.db_price = jobline.act_price;
|
||||
}
|
||||
//Removed as a part of $0db removal on 12/17/2022.
|
||||
// if (
|
||||
// (jobline.db_price === null || jobline.db_price === 0) &&
|
||||
// !!jobline.act_price &&
|
||||
// jobline.act_price > 0
|
||||
// ) {
|
||||
// // log.info(
|
||||
// // "DB Price null/lower than act price",
|
||||
// // jobline.line_desc,
|
||||
// // jobline.db_price,
|
||||
// // jobline.act_price
|
||||
// // );
|
||||
// jobline.db_price = jobline.act_price;
|
||||
// }
|
||||
|
||||
//*****TODO LINE****
|
||||
//Any PAL, Remanufactured, Recycled, Aftermarket, Used,
|
||||
@@ -414,18 +420,22 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
|
||||
//RPS-39 - OEM ON OEM SAVINGS
|
||||
//Verified on 08/24/21
|
||||
if (jobline.part_type === "PAN" && jobline.db_price !== jobline.act_price) {
|
||||
if (
|
||||
jobline.part_type === "PAN" &&
|
||||
jobline.db_price !== jobline.act_price &&
|
||||
jobline.db_price !== 0
|
||||
) {
|
||||
jobline.db_price = jobline.act_price;
|
||||
}
|
||||
|
||||
//$0DB price for aftermarket and recycled parts. RPS-83
|
||||
//Verified on 08/24/21
|
||||
//Remove all $0DB line items 02/17/2022.
|
||||
if (
|
||||
(jobline.part_type === "PAA" || jobline.part_type === "PAL") &&
|
||||
jobline.db_price === 0 &&
|
||||
jobline.db_price !== jobline.act_price
|
||||
(jobline.part_type === "PAA" ||
|
||||
jobline.part_type === "PAL" ||
|
||||
jobline.part_type === "PAN") &&
|
||||
jobline.db_price === 0
|
||||
) {
|
||||
jobline.db_price = jobline.act_price;
|
||||
jobline.ignore = true;
|
||||
}
|
||||
|
||||
//05/20
|
||||
|
||||
Reference in New Issue
Block a user