only use list if relevance is type 2 exact match

This commit is contained in:
Paul Trowbridge 2023-11-13 12:43:44 -05:00
parent 15c60c629d
commit 7919160ecc

View File

@ -20,7 +20,7 @@ export function apply_guidance(doc: any) {
let finalPrice = null;
const inflation = Math.max(...Object.keys(iidx).map(Number));
const inflationFactor = iidx[inflation] + 1;
const list = doc.pricing?.list && doc.product?.itemrel === 1 ? doc.pricing?.list : null;
const list = doc.pricing?.list && doc.product?.itemrel === "2" ? doc.pricing?.list : null;
// ------if there is not target price just exit---------------
if (!targetPrice) {
anchorSource = "No target pricing setup";
@ -83,6 +83,7 @@ export function apply_guidance(doc: any) {
guidance.FinalReason = finalReason;
guidance.BridgePremium = bridgePremium;
guidance.TargetPrice = targetPrice;
guidance.ListPrice = list;
doc.guidance = guidance;
return doc;
}