Actualizar index.html
This commit is contained in:
10
index.html
10
index.html
@@ -301,7 +301,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div style="width: 250px; margin-left: auto; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 20px;">
|
<div style="width: 250px; margin-left: auto; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 20px; page-break-inside: avoid;">
|
||||||
<div style="display: flex; justify-content: space-between; padding: 8px 15px; font-size: 11px; 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;">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>
|
||||||
@@ -316,7 +316,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin-top: auto; padding-top: 20px;">
|
<div style="page-break-inside: avoid; margin-top: 40px; padding-bottom: 20px;">
|
||||||
<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;">
|
<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:<br>
|
Para confirmar el presupuesto, por favor realice una transferencia a la siguiente cuenta:<br>
|
||||||
@@ -927,8 +927,8 @@ lucide.createIcons();
|
|||||||
let itemsHtml = '';
|
let itemsHtml = '';
|
||||||
if (itemsArr.length > 0) {
|
if (itemsArr.length > 0) {
|
||||||
itemsHtml = itemsArr.map(item => `
|
itemsHtml = itemsArr.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>
|
||||||
@@ -978,7 +978,7 @@ lucide.createIcons();
|
|||||||
|
|
||||||
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_${budget.quote_ref || budget.id}.pdf`,
|
filename: `Presupuesto_${budget.quote_ref || budget.id}.pdf`,
|
||||||
image: { type: 'jpeg', quality: 1 },
|
image: { type: 'jpeg', quality: 1 },
|
||||||
// 🛑 FIX: Añadimos scrollY: 0 y windowY: 0 para que haga la "foto" clavada arriba
|
// 🛑 FIX: Añadimos scrollY: 0 y windowY: 0 para que haga la "foto" clavada arriba
|
||||||
|
|||||||
Reference in New Issue
Block a user