shareneus 1.5.27 → 1.5.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -118,7 +118,7 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
|
|
|
118
118
|
const tier = ResolveTier(resolvedQty, priceList.QtyTiers);
|
|
119
119
|
if (tier) {
|
|
120
120
|
item.PriceTiers = (_c = priceList.QtyTiers) !== null && _c !== void 0 ? _c : undefined;
|
|
121
|
-
if (item.Track === "TR" || item.Track === "SN") {
|
|
121
|
+
if (item.Track === "TR" || item.Track === "SN" || ((0, util_1.IsNull)(item.Track) && (0, util_1.IsNotNull)(item.Sale))) {
|
|
122
122
|
item.Sale["MRP"] = item.Sale.Price;
|
|
123
123
|
const basePrice = DetermineBasePriceForTier(item, priceList);
|
|
124
124
|
item.Sale.Price = ApplyTierAdjustment(basePrice, tier, priceList, markUp);
|
|
@@ -144,7 +144,7 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
|
|
|
144
144
|
if (priceList.Fixed && (0, util_1.IsNotNull)(priceList.Fixed.Price)) {
|
|
145
145
|
const fixedPrice = priceList.Fixed.Price;
|
|
146
146
|
const fixedDisc = priceList.Fixed.Disc || 0;
|
|
147
|
-
if (item.Track === "TR" || item.Track === "SN") {
|
|
147
|
+
if (item.Track === "TR" || item.Track === "SN" || ((0, util_1.IsNull)(item.Track) && (0, util_1.IsNotNull)(item.Sale))) {
|
|
148
148
|
item.Sale["MRP"] = item.Sale.Price;
|
|
149
149
|
if ((0, util_1.IsNotNull)(fixedDisc) && fixedDisc > 0) {
|
|
150
150
|
item.Sale.Price = CalcItemFinalSalePrice(fixedPrice, fixedDisc, priceList);
|
|
@@ -175,7 +175,7 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
|
|
|
175
175
|
else if (priceList.PrCalc === "DISC") {
|
|
176
176
|
const discPerc = calcDisc.Perc || 0;
|
|
177
177
|
if (priceList.BasedOn === "SP") {
|
|
178
|
-
if (item.Track === "TR" || item.Track === "SN") {
|
|
178
|
+
if (item.Track === "TR" || item.Track === "SN" || ((0, util_1.IsNull)(item.Track) && (0, util_1.IsNotNull)(item.Sale))) {
|
|
179
179
|
item.Sale["MRP"] = item.Sale.Price;
|
|
180
180
|
item.Sale.Price = CalcItemFinalSalePrice(item.Sale.Price, discPerc, priceList, markUp);
|
|
181
181
|
if (includeMargin && (0, util_1.IsNotNull)(item.Pur) && (0, util_1.IsNotNull)(item.Pur.Cost)) {
|
|
@@ -193,7 +193,7 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
else if (priceList.BasedOn === "PC") {
|
|
196
|
-
if (item.Track === "TR" || item.Track === "SN") {
|
|
196
|
+
if (item.Track === "TR" || item.Track === "SN" || ((0, util_1.IsNull)(item.Track) && (0, util_1.IsNotNull)(item.Sale))) {
|
|
197
197
|
item.Sale["MRP"] = item.Sale.Price;
|
|
198
198
|
if ((0, util_1.IsNotNull)(item.Pur) && (0, util_1.IsNotNull)(item.Pur.Cost)) {
|
|
199
199
|
item.Sale.Price = CalcItemFinalSalePrice(item.Pur.Cost, discPerc, priceList, markUp);
|