ensure prices stay as ints
This commit is contained in:
parent
12bdfae1cf
commit
9dd53adcdd
@ -164,15 +164,15 @@ export const applyStandingToVendorManifest = (
|
|||||||
if (offer.RegularPrice) {
|
if (offer.RegularPrice) {
|
||||||
offer.RegularPriceBeforeDiscount = offer.RegularPrice;
|
offer.RegularPriceBeforeDiscount = offer.RegularPrice;
|
||||||
offer.RegularPrice = [
|
offer.RegularPrice = [
|
||||||
offer.RegularPriceBeforeDiscount[0] * factor,
|
Math.trunc(offer.RegularPriceBeforeDiscount[0] * factor),
|
||||||
offer.RegularPriceBeforeDiscount[1] * factor
|
Math.trunc(offer.RegularPriceBeforeDiscount[1] * factor)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (offer.ItemPrices) {
|
if (offer.ItemPrices) {
|
||||||
offer.ItemPricesBeforeDiscount = offer.ItemPrices;
|
offer.ItemPricesBeforeDiscount = offer.ItemPrices;
|
||||||
offer.ItemPrices = [];
|
offer.ItemPrices = [];
|
||||||
for (const item of offer.ItemPricesBeforeDiscount) {
|
for (const item of offer.ItemPricesBeforeDiscount) {
|
||||||
offer.ItemPrices.push({ ...item, ItemCount: item.ItemCount * factor });
|
offer.ItemPrices.push({ ...item, ItemCount: Math.trunc(item.ItemCount * factor) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user