Actualizar contabilidad.html

This commit is contained in:
2026-08-02 18:46:42 +00:00
parent 07c782940b
commit 18af2955a9

View File

@@ -1022,8 +1022,8 @@
document.getElementById('pdf-client-address').innerText = budget.client_address || "-"; document.getElementById('pdf-client-address').innerText = budget.client_address || "-";
const itemsHtml = (budget.items || []).map(item => ` const itemsHtml = (budget.items || []).map(item => `
<tr> <tr style="page-break-inside: avoid;">
<td style="padding: 8px 10px; border-bottom: 1px solid #e2e8f0; font-size: 12px; color: #334155;">${item.concept}</td> <td style="padding: 12px 10px; border-bottom: 1px solid #e2e8f0; font-size: 12px; color: #334155; text-align: justify; line-height: 1.5;">${item.concept.replace(/\n/g, '<br>')}</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: 8px 10px; border-bottom: 1px solid #e2e8f0; font-size: 12px; 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: 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: 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> <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>
@@ -1059,7 +1059,7 @@
const element = document.getElementById('pdf-content'); const element = document.getElementById('pdf-content');
const opt = { const opt = {
margin: 0, margin: [0.5, 0, 0.5, 0],
filename: `Presupuesto_PRE${budget.id}_${budget.client_name.replace(/\s+/g, '_')}.pdf`, filename: `Presupuesto_PRE${budget.id}_${budget.client_name.replace(/\s+/g, '_')}.pdf`,
image: { type: 'jpeg', quality: 1 }, image: { type: 'jpeg', quality: 1 },
html2canvas: { scale: 2, useCORS: true, logging: false }, html2canvas: { scale: 2, useCORS: true, logging: false },