Removed prevention of negative RPS scores for non-oem parts RPS-72
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user