Recycled Glass Updates

This commit is contained in:
Patrick Fic
2021-01-27 12:05:13 -08:00
parent bdf39cc087
commit e53d3a2588
3 changed files with 29 additions and 12 deletions

View File

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