pull in pallet quantity and assign ltp

This commit is contained in:
Paul Trowbridge 2023-11-13 13:15:24 -05:00
parent a5acb798b4
commit f91beee772
1 changed files with 4 additions and 0 deletions

View File

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