diff --git a/index.html b/index.html index 3dfd85f..43d959f 100644 --- a/index.html +++ b/index.html @@ -926,14 +926,20 @@ lucide.createIcons(); let itemsHtml = ''; if (itemsArr.length > 0) { - itemsHtml = itemsArr.map(item => ` + itemsHtml = itemsArr.map(item => { + const priceNum = parseFloat(item.price) || 0; + const qtyNum = parseFloat(item.qty) || 0; + const subNum = priceNum * qtyNum; + const isZero = priceNum === 0; + + return ` ${item.concept.replace(/\n/g, '
')} - ${item.qty} - ${parseFloat(item.price).toFixed(2)} € - ${(item.qty * item.price).toFixed(2)} € + ${isZero ? '' : item.qty} + ${isZero ? '' : priceNum.toFixed(2) + ' €'} + ${isZero ? '' : subNum.toFixed(2) + ' €'} - `).join(''); + `}).join(''); } else { itemsHtml = ` ${budget.title || "Presupuesto General de Reparación"}