shareneus 1.7.331 → 1.7.332
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.
|
@@ -146,6 +146,10 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
|
|
|
146
146
|
if (priceList.Fixed && (0, util_1.IsNotNull)(priceList.Fixed.Price)) {
|
|
147
147
|
const fixedPrice = priceList.Fixed.Price;
|
|
148
148
|
const fixedDisc = priceList.Fixed.Disc || 0;
|
|
149
|
+
console.log('Track', item.Track);
|
|
150
|
+
console.log('Batches', item.Batches);
|
|
151
|
+
console.log('is Array', Array.isArray(item.Batches));
|
|
152
|
+
console.log('condition', item.Track === "BN" && Array.isArray(item.Batches));
|
|
149
153
|
if (item.Track === "TR" || item.Track === "SN") {
|
|
150
154
|
item.Sale["MRP"] = item.Sale.Price;
|
|
151
155
|
if ((0, util_1.IsNotNull)(fixedDisc) && fixedDisc > 0) {
|
|
@@ -160,6 +164,7 @@ function CalculatePriceBasedOnPriceList(item, priceList, includeMargin, quantity
|
|
|
160
164
|
}
|
|
161
165
|
else if (item.Track === "BN" && Array.isArray(item.Batches)) {
|
|
162
166
|
for (const batch of item.Batches) {
|
|
167
|
+
console.log('element batch before price calculation', batch);
|
|
163
168
|
batch.MRP = batch.Price;
|
|
164
169
|
if ((0, util_1.IsNotNull)(fixedDisc) && fixedDisc > 0) {
|
|
165
170
|
batch.Price = CalcItemFinalSalePrice(fixedPrice, fixedDisc, priceList);
|
package/package.json
CHANGED
|
@@ -179,7 +179,10 @@ function CalculatePriceBasedOnPriceList(
|
|
|
179
179
|
if (priceList.Fixed && IsNotNull(priceList.Fixed.Price)) {
|
|
180
180
|
const fixedPrice = priceList.Fixed.Price;
|
|
181
181
|
const fixedDisc = priceList.Fixed.Disc || 0;
|
|
182
|
-
|
|
182
|
+
console.log('Track', item.Track);
|
|
183
|
+
console.log('Batches', item.Batches);
|
|
184
|
+
console.log('is Array', Array.isArray(item.Batches));
|
|
185
|
+
console.log('condition', item.Track === "BN" && Array.isArray(item.Batches));
|
|
183
186
|
if (item.Track === "TR" || item.Track === "SN") {
|
|
184
187
|
item.Sale["MRP"] = item.Sale.Price;
|
|
185
188
|
if (IsNotNull(fixedDisc) && fixedDisc > 0) {
|
|
@@ -193,6 +196,7 @@ function CalculatePriceBasedOnPriceList(
|
|
|
193
196
|
}
|
|
194
197
|
} else if (item.Track === "BN" && Array.isArray(item.Batches)) {
|
|
195
198
|
for (const batch of item.Batches) {
|
|
199
|
+
console.log('element batch before price calculation', batch);
|
|
196
200
|
batch.MRP = batch.Price;
|
|
197
201
|
if (IsNotNull(fixedDisc) && fixedDisc > 0) {
|
|
198
202
|
batch.Price = CalcItemFinalSalePrice(fixedPrice, fixedDisc, priceList);
|