ensure prices stay as ints
All checks were successful
Build / build (pull_request) Successful in 1m45s
Build / build (push) Successful in 1m43s

This commit is contained in:
Sainan 2025-05-16 09:18:38 +02:00
parent 12bdfae1cf
commit 9dd53adcdd

View File

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