diff --git a/apply_guidance.ts b/apply_guidance.ts index c21ae69..a329708 100644 --- a/apply_guidance.ts +++ b/apply_guidance.ts @@ -8,6 +8,8 @@ export function apply_guidance(doc: any) { const iidx = doc.pricing?.iidx; const curr = doc.customer?.curr; const fxrate = doc.customer?.fxrate ?? 1.0; + const qty = doc.inputs?.qty; + const pltq = doc.product?.pltq; let anchorPrice = null; let anchorSource = null; let custPrice = null; @@ -18,6 +20,8 @@ export function apply_guidance(doc: any) { let finalPriceUSD = null; let finalReason = ""; let finalPrice = null; + let ltp = qty < pltq ? 1.15 : null; + let increase = null; const inflation = Math.max(...Object.keys(iidx).map(Number)); const inflationFactor = iidx[inflation] + 1; const list = doc.pricing?.list && doc.product?.itemrel === "2" ? doc.pricing?.list : null;