This commit is contained in:
2026-05-15 16:45:56 +02:00
parent 921c861311
commit 04671637d2
8 changed files with 70 additions and 25 deletions
@@ -56,10 +56,13 @@ export default function ProductDetailScreen() {
const fixedProduct = {
...p,
prices:
p.prices?.map((pr: any) => ({
quantity: parseFloat(String(pr.quantity)),
price: parseFloat(String(pr.price)),
})) || [],
p.prices
?.filter((pr: any) => pr.active_price !== false)
.map((pr: any) => ({
quantity: parseFloat(String(pr.quantity)),
price: parseFloat(String(pr.price)),
active_price: pr.active_price,
})) || [],
};
setProduct(fixedProduct);
if (fixedProduct.prices.length > 0) {