SGI Price Match Rule Change
RPS Price Match
This commit is contained in:
@@ -596,9 +596,22 @@ function V3Ruleset(jobline, joblines) {
|
||||
}
|
||||
|
||||
function SGI_V1Ruleset(jobline, joblines) {
|
||||
//RPS-39 - OEM ON OEM SAVINGS
|
||||
//Verified on 08/24/21
|
||||
if (jobline.part_type === "PAN" && jobline.db_price !== jobline.act_price && jobline.db_price !== 0) {
|
||||
// RPS-39 - OEM ON OEM SAVINGS
|
||||
// Verified on 08/24/21
|
||||
// 2026-05-26 Added Parts Price Match logic for SGI
|
||||
const hasPriceMatch = joblines.some(
|
||||
(l) =>
|
||||
String(l.line_ref) === String(jobline.unq_seq) &&
|
||||
l.db_ref === "900501" &&
|
||||
l.line_desc.toLowerCase().includes("rps price match")
|
||||
);
|
||||
|
||||
if (
|
||||
jobline.part_type === "PAN" &&
|
||||
jobline.db_price !== jobline.act_price &&
|
||||
jobline.db_price !== 0 &&
|
||||
!hasPriceMatch
|
||||
) {
|
||||
jobline.db_price = jobline.act_price;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user