From 54eea58f235d2a603582011c19e14949bb7e1b76 Mon Sep 17 00:00:00 2001 From: marsalva Date: Sun, 2 Aug 2026 19:18:45 +0000 Subject: [PATCH] Actualizar index.html --- index.html | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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"}