Actualizar contabilidad.html

This commit is contained in:
2026-03-24 15:11:57 +00:00
parent 92704dcb73
commit b83103eead

View File

@@ -247,88 +247,87 @@
</div> </div>
<div id="pdf-wrapper" class="hidden"> <div id="pdf-wrapper" class="hidden">
<div id="pdf-content" style="background-color: white; color: #1e293b; font-family: Arial, Helvetica, sans-serif; width: 800px; min-height: 1120px; position: relative; padding: 50px; box-sizing: border-box;"> <div id="pdf-content" style="background-color: white; color: #1e293b; font-family: Arial, Helvetica, sans-serif; width: 800px; min-height: 1120px; position: relative; padding: 30px 40px; box-sizing: border-box;">
<div style="display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #e2e8f0; padding-bottom: 30px; margin-bottom: 40px;"> <div style="display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #e2e8f0; padding-bottom: 15px; margin-bottom: 20px;">
<div style="max-width: 250px; max-height: 100px;"> <div style="max-width: 250px; max-height: 80px;">
<img id="pdf-company-logo" src="" alt="Logo Empresa" style="max-width: 100%; max-height: 100px; object-fit: contain; display: none;"> <img id="pdf-company-logo" src="" alt="Logo Empresa" style="max-width: 100%; max-height: 80px; object-fit: contain; display: none;">
<h2 id="pdf-company-name-fallback" style="margin:0; color:#2563eb; font-size: 24px; font-weight: 900; display: none;">IntegraRepara</h2> <h2 id="pdf-company-name-fallback" style="margin:0; color:#2563eb; font-size: 22px; font-weight: 900; display: none;">IntegraRepara</h2>
</div> </div>
<div style="text-align: right; font-size: 12px; color: #64748b; line-height: 1.6;"> <div style="text-align: right; font-size: 11px; color: #64748b; line-height: 1.4;">
<div id="pdf-company-name" style="font-size: 16px; font-weight: 900; color: #0f172a; margin-bottom: 4px;">Empresa S.L.</div> <div id="pdf-company-name" style="font-size: 14px; font-weight: 900; color: #0f172a; margin-bottom: 2px;">Empresa S.L.</div>
<div id="pdf-company-dni">CIF: B12345678</div> <div id="pdf-company-dni">CIF: B12345678</div>
<div id="pdf-company-address">Calle Falsa 123</div> <div id="pdf-company-address">Calle Falsa 123</div>
<div id="pdf-company-location">28000 Madrid (Madrid)</div> <div id="pdf-company-location">28000 Madrid (Madrid)</div>
</div> </div>
</div> </div>
<div style="display: flex; justify-content: space-between; margin-bottom: 40px;"> <div style="display: flex; justify-content: space-between; margin-bottom: 20px;">
<div> <div>
<h1 style="font-size: 32px; font-weight: 900; color: #2563eb; margin: 0 0 10px 0; letter-spacing: -1px;">PRESUPUESTO</h1> <h1 style="font-size: 24px; font-weight: 900; color: #2563eb; margin: 0 0 5px 0; letter-spacing: -1px;">PRESUPUESTO</h1>
<div style="font-size: 14px; color: #64748b; line-height: 1.6;"> <div style="font-size: 12px; color: #64748b; line-height: 1.4;">
<strong>Referencia:</strong> <span id="pdf-budget-id">#PRE-000</span><br> <strong>Referencia:</strong> <span id="pdf-budget-id">#PRE-000</span><br>
<strong>Fecha:</strong> <span id="pdf-date">01/01/2026</span><br> <strong>Fecha:</strong> <span id="pdf-date">01/01/2026</span><br>
<strong>Validez:</strong> 30 días<br> <strong>Validez:</strong> 30 días<br>
</div> </div>
</div> </div>
<div style="background-color: #f8fafc; border: 1px solid #e2e8f0; padding: 20px; border-radius: 12px; width: 300px;"> <div style="background-color: #f8fafc; border: 1px solid #e2e8f0; padding: 12px 15px; border-radius: 8px; width: 280px;">
<h3 style="margin: 0 0 10px 0; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; font-weight: 800;">Presupuestado a:</h3> <h3 style="margin: 0 0 5px 0; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; font-weight: 800;">Presupuestado a:</h3>
<p id="pdf-client-name" style="font-size: 16px; font-weight: 800; color: #0f172a; margin: 0 0 8px 0;">Nombre Cliente</p> <p id="pdf-client-name" style="font-size: 14px; font-weight: 800; color: #0f172a; margin: 0 0 4px 0;">Nombre Cliente</p>
<p style="font-size: 13px; margin: 0; color: #475569; line-height: 1.6;"> <p style="font-size: 12px; margin: 0; color: #475569; line-height: 1.4;">
<span id="pdf-client-phone">Teléfono</span><br> <span id="pdf-client-phone">Teléfono</span><br>
<span id="pdf-client-address">Dirección</span> <span id="pdf-client-address">Dirección</span>
</p> </p>
</div> </div>
</div> </div>
<table style="width: 100%; border-collapse: collapse; margin-bottom: 40px;"> <table style="width: 100%; border-collapse: collapse; margin-bottom: 20px;">
<thead> <thead>
<tr> <tr>
<th style="background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; font-size: 11px; padding: 12px 15px; text-align: left; border-bottom: 2px solid #cbd5e1; border-radius: 8px 0 0 0;">Concepto</th> <th style="background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; font-size: 10px; padding: 8px 10px; text-align: left; border-bottom: 2px solid #cbd5e1; border-radius: 6px 0 0 0;">Concepto</th>
<th style="background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; font-size: 11px; padding: 12px 15px; text-align: center; border-bottom: 2px solid #cbd5e1;">Cant.</th> <th style="background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; font-size: 10px; padding: 8px 10px; text-align: center; border-bottom: 2px solid #cbd5e1;">Cant.</th>
<th style="background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; font-size: 11px; padding: 12px 15px; text-align: right; border-bottom: 2px solid #cbd5e1;">Precio Ud.</th> <th style="background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; font-size: 10px; padding: 8px 10px; text-align: right; border-bottom: 2px solid #cbd5e1;">Precio Ud.</th>
<th style="background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; font-size: 11px; padding: 12px 15px; text-align: right; border-bottom: 2px solid #cbd5e1; border-radius: 0 8px 0 0;">Subtotal</th> <th style="background: #f1f5f9; color: #475569; font-weight: 800; text-transform: uppercase; font-size: 10px; padding: 8px 10px; text-align: right; border-bottom: 2px solid #cbd5e1; border-radius: 0 6px 0 0;">Subtotal</th>
</tr> </tr>
</thead> </thead>
<tbody id="pdf-items"> <tbody id="pdf-items">
</tbody> </tbody>
</table> </table>
<div style="width: 320px; margin-left: auto; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; margin-bottom: 40px;"> <div style="width: 250px; margin-left: auto; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 20px;">
<div style="display: flex; justify-content: space-between; padding: 12px 20px; font-size: 13px; border-bottom: 1px solid #f1f5f9; color: #475569;"> <div style="display: flex; justify-content: space-between; padding: 8px 15px; font-size: 11px; border-bottom: 1px solid #f1f5f9; color: #475569;">
<span style="font-weight: 600; text-transform: uppercase; letter-spacing: 1px;">Base Imponible</span> <span style="font-weight: 600; text-transform: uppercase;">Base Imponible</span>
<span id="pdf-subtotal" style="font-weight: 800; color: #0f172a;">0.00 €</span> <span id="pdf-subtotal" style="font-weight: 800; color: #0f172a;">0.00 €</span>
</div> </div>
<div style="display: flex; justify-content: space-between; padding: 12px 20px; font-size: 13px; border-bottom: 1px solid #f1f5f9; color: #475569;"> <div style="display: flex; justify-content: space-between; padding: 8px 15px; font-size: 11px; border-bottom: 1px solid #f1f5f9; color: #475569;">
<span style="font-weight: 600; text-transform: uppercase; letter-spacing: 1px;">IVA (21%)</span> <span style="font-weight: 600; text-transform: uppercase;">IVA (21%)</span>
<span id="pdf-tax" style="font-weight: 800; color: #0f172a;">0.00 €</span> <span id="pdf-tax" style="font-weight: 800; color: #0f172a;">0.00 €</span>
</div> </div>
<div style="display: flex; justify-content: space-between; padding: 16px 20px; background: #2563eb; color: white;"> <div style="display: flex; justify-content: space-between; padding: 10px 15px; background: #2563eb; color: white;">
<span style="font-weight: 900; font-size: 16px; letter-spacing: 1px;">TOTAL A PAGAR</span> <span style="font-weight: 900; font-size: 13px;">TOTAL A PAGAR</span>
<span id="pdf-total" style="font-weight: 900; font-size: 20px;">0.00 €</span> <span id="pdf-total" style="font-weight: 900; font-size: 16px;">0.00 €</span>
</div> </div>
</div> </div>
<div style="position: absolute; bottom: 50px; left: 50px; right: 50px;"> <div style="position: absolute; bottom: 30px; left: 40px; right: 40px;">
<div id="pdf-bank-info" style="margin-bottom: 20px; padding: 20px; background-color: #f0fdf4; border-left: 4px solid #22c55e; border-radius: 0 8px 8px 0; font-size: 12px; color: #166534; display: none;"> <div id="pdf-bank-info" style="margin-bottom: 10px; padding: 12px 15px; background-color: #f0fdf4; border-left: 4px solid #22c55e; border-radius: 0 6px 6px 0; font-size: 11px; color: #166534; display: none;">
<strong>INFORMACIÓN DE PAGO</strong><br> <strong>INFORMACIÓN DE PAGO</strong><br>
Para confirmar el presupuesto, por favor realice una transferencia a la siguiente cuenta indicando el número de referencia:<br> Para confirmar el presupuesto, por favor realice una transferencia a la siguiente cuenta:<br>
<span id="pdf-bank-account" style="font-size: 16px; font-weight: 900; letter-spacing: 2px; margin-top: 8px; display: inline-block;">ES00 0000 0000 0000 0000</span> <span id="pdf-bank-account" style="font-size: 14px; font-weight: 900; letter-spacing: 1px; margin-top: 4px; display: inline-block;">ES00 0000 0000 0000 0000</span>
</div> </div>
<div id="pdf-obs-info" style="margin-bottom: 30px; padding: 20px; background-color: #fefce8; border-left: 4px solid #f59e0b; border-radius: 0 8px 8px 0; font-size: 11px; color: #713f12; display: none;"> <div id="pdf-obs-info" style="margin-bottom: 15px; padding: 12px 15px; background-color: #fefce8; border-left: 4px solid #f59e0b; border-radius: 0 6px 6px 0; font-size: 10px; color: #713f12; display: none;">
<strong>OBSERVACIONES Y CONDICIONES</strong><br> <strong>OBSERVACIONES Y CONDICIONES</strong><br>
<span id="pdf-obs-text"></span> <span id="pdf-obs-text"></span>
</div> </div>
<div style="text-align: center; font-size: 10px; color: #94a3b8; border-top: 1px solid #e2e8f0; padding-top: 20px;"> <div style="text-align: center; font-size: 9px; color: #94a3b8; border-top: 1px solid #e2e8f0; padding-top: 10px;">
Documento generado por IntegraRepara - Sistema de Gestión de Asistencias Documento generado por IntegraRepara - Sistema de Gestión de Asistencias
</div> </div>
</div> </div>
</div> </div>
</div>
<div id="toast" class="fixed bottom-8 right-8 bg-slate-900 text-white px-6 py-3 rounded-2xl shadow-2xl hidden z-[200] font-bold text-sm flex items-center gap-2 transition-all"></div> <div id="toast" class="fixed bottom-8 right-8 bg-slate-900 text-white px-6 py-3 rounded-2xl shadow-2xl hidden z-[200] font-bold text-sm flex items-center gap-2 transition-all"></div>
@@ -905,10 +904,10 @@
const itemsHtml = (budget.items || []).map(item => ` const itemsHtml = (budget.items || []).map(item => `
<tr> <tr>
<td style="padding: 15px; border-bottom: 1px solid #e2e8f0; font-size: 13px; color: #334155;">${item.concept}</td> <td style="padding: 8px 10px; border-bottom: 1px solid #e2e8f0; font-size: 12px; color: #334155;">${item.concept}</td>
<td style="padding: 15px; border-bottom: 1px solid #e2e8f0; font-size: 13px; color: #334155; text-align: center;">${item.qty}</td> <td style="padding: 8px 10px; border-bottom: 1px solid #e2e8f0; font-size: 12px; color: #334155; text-align: center;">${item.qty}</td>
<td style="padding: 15px; border-bottom: 1px solid #e2e8f0; font-size: 13px; color: #334155; text-align: right;">${parseFloat(item.price).toFixed(2)} €</td> <td style="padding: 8px 10px; border-bottom: 1px solid #e2e8f0; font-size: 12px; color: #334155; text-align: right;">${parseFloat(item.price).toFixed(2)} €</td>
<td style="padding: 15px; border-bottom: 1px solid #e2e8f0; font-size: 13px; font-weight: 700; color: #0f172a; text-align: right;">${(item.qty * item.price).toFixed(2)} €</td> <td style="padding: 8px 10px; border-bottom: 1px solid #e2e8f0; font-size: 12px; font-weight: 700; color: #0f172a; text-align: right;">${(item.qty * item.price).toFixed(2)} €</td>
</tr> </tr>
`).join(''); `).join('');
document.getElementById('pdf-items').innerHTML = itemsHtml; document.getElementById('pdf-items').innerHTML = itemsHtml;