$0db and Wheel Repair Pricing

This commit is contained in:
Patrick Fic
2021-04-07 14:34:13 -07:00
parent 888a92499c
commit 8f532d9ff8
2 changed files with 26 additions and 4 deletions

View File

@@ -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;