draft de impresion presupuesto, añadiendo posibilidades de iva

This commit is contained in:
2025-10-13 14:38:30 +02:00
parent 9d88392a2b
commit d99ef65268
11 changed files with 712 additions and 252 deletions

View File

@ -0,0 +1,59 @@
/* =======================
Bootstrap for PDF (compatible con OpenHTMLtoPDF)
======================= */
/* -- TEXT ALIGN -- */
.text-start { text-align: left !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
/* -- FONT WEIGHT -- */
.fw-normal { font-weight: 400 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
/* -- SPACING (margin/padding) -- */
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
/* -- TABLE -- */
.table {
width: 100%;
border-collapse: collapse;
font-size: 10.5pt;
}
.table th,
.table td {
padding: 6px;
border: 1px solid #dee2e6;
}
.table thead th {
background-color: #f8f9fa;
font-weight: 700;
}
/* -- BORDER -- */
.border {
border: 1px solid #dee2e6 !important;
}
.border-0 { border: 0 !important; }
/* -- BACKGROUND -- */
.bg-light { background-color: #f8f9fa !important; }
.bg-white { background-color: #fff !important; }
/* -- DISPLAY UTILS (limited) -- */
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }

View File

@ -414,6 +414,7 @@
.form-switch-presupuesto .form-check-input:checked {
border-color: #92b2a7;
background-color: #cbcecd;
}
.form-switch-custom.form-switch-presupuesto .form-check-input:checked::before {

View File

@ -1,54 +1,169 @@
:root {
--verde: #92b2a7;
--letterspace: 8px;
/* ← puedes ajustar este valor en el root */
-ink: #1b1e28;
--muted: #5b6472;
--accent: #0ea5e9;
/* azul tira a cyan */
--line: #e6e8ef;
--bg-tag: #f4f7fb;
}
/* Open Sans (rutas relativas desde css → fonts) */
@font-face {
font-family: "Open Sans";
src: url("../fonts/OpenSans-Regular.ttf") format("truetype");
font-weight: 400;
}
@font-face {
font-family: "Open Sans";
src: url("../fonts/OpenSans-SemiBold.ttf") format("truetype");
font-weight: 600;
}
@font-face {
font-family: "Open Sans";
src: url("../fonts/OpenSans-Bold.ttf") format("truetype");
font-weight: 700;
}
:root {
--ink: #1b1e28;
--muted: #5b6472;
--accent: #0ea5e9; /* azul tira a cyan */
--line: #e6e8ef;
--bg-tag: #f4f7fb;
}
@page {
size: A4;
margin: 15mm 14mm 18mm 14mm;
@bottom-right { content: "Página " counter(page) " / " counter(pages); }
margin: 0;
}
html, body {
font-family: "Open Sans", Arial, sans-serif;
html,
body {
font-family: "Open Sans" !important;
color: var(--ink);
font-size: 11pt;
line-height: 1.35;
}
/* Top band */
.topbar {
display: table;
width: 100%;
border-bottom: 2px solid var(--accent);
padding-bottom: 6mm;
margin-bottom: 6mm;
.page-content {
padding: 15mm 14mm 28mm 14mm; /* ↑ deja 10mm extra para no pisar el footer */
box-sizing: border-box; /* para que el padding no desborde */
}
.brand { display: table-cell; width: 60%; vertical-align: top; }
.logo { height: 30px; display: block; margin-bottom: 4px; }
.brand-name { font-weight: 700; }
.brand-meta { color: var(--muted); font-size: 9.5pt; }
.doc-title { display: table-cell; width: 40%; text-align: right; font-weight: 700; letter-spacing: 3px; }
body.has-watermark {
background-image: none !important;
}
/* ====== HEADER (tabla) ====== */
.il-header {
width: 100%;
border-collapse: collapse;
margin: 0 0 8mm 0;
/* ↓ espacio bajo el header */
}
.il-left,
.il-right {
vertical-align: middle;
}
.il-left {
width: 50%;
}
.il-right {
width: 50%;
text-align: right;
}
.il-logo {
height: 70px;
}
/* ← tamaño logo */
/* Caja superior derecha con esquinas */
.il-company-box {
display: inline-block;
align-items: end;
/* para alinear a la derecha sin ocupar todo */
position: relative;
padding: 4mm 4mm;
/* ← espacio texto ↔ esquinas */
color: #000;
font-size: 10.5pt;
/* ← tamaño de letra */
line-height: 1;
/* ← separación entre líneas */
max-width: 75mm;
/* ← ancho máximo de la caja */
text-align: center;
}
/* Esquinas */
.il-company-box .corner {
position: absolute;
width: 20px;
/* ← anchura esquina */
height: 20px;
/* ← altura esquina */
border-color: #92b2a7;
/* ← color esquina */
}
.corner.tl {
top: 0;
left: 0;
border-top: 2px solid #92b2a7;
border-left: 2px solid #92b2a7;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #92b2a7;
border-right: 2px solid #92b2a7;
}
.corner.bl {
bottom: 0;
left: 0;
border-bottom: 2px solid #92b2a7;
border-left: 2px solid #92b2a7;
}
.corner.br {
bottom: 0;
right: 0;
border-bottom: 2px solid #92b2a7;
border-right: 2px solid #92b2a7;
}
.company-line {
margin: 1.5mm 0;
}
/* Nueva banda verde PRESUPUESTO */
.doc-banner {
width: 100%;
background-color: #92b2a7 !important; /* ← tu verde corporativo */
color: white;
text-align: center;
padding: 2mm 0;
margin-bottom: 4mm;
display: block; /* evita conflictos */
}
.banner-text {
font-family: "Open Sans", Arial, sans-serif !important;
font-weight: 400;
font-size: 20pt;
letter-spacing: 8px; /* ← configurable */
}
/* ficha superior */
.sheet-info {
@ -57,41 +172,99 @@ html, body {
margin: 4mm 0 6mm 0;
font-size: 10.5pt;
}
.sheet-info td {
border: 1px solid var(--line);
padding: 4px 6px;
}
.sheet-info .lbl { color: var(--muted); margin-right: 4px; }
.sheet-info .val { font-weight: 700; }
.sheet-info .lbl {
color: var(--muted);
margin-right: 4px;
}
/*.sheet-info .val {
}*/
/* Línea título libro */
.line-title {
font-family: "Open Sans", Arial, sans-serif !important;
margin: 3mm 0 5mm 0;
padding: 4px 6px;
background: var(--bg-tag);
border-left: 3px solid var(--accent);
padding: 2px 4px;
font-size: 10.5pt;
font-weight: 600;
color: #5c5c5c;
}
.line-title .lbl {
margin-right: 6px;
font-weight: 600;
}
.line-title .lbl { color: var(--muted); margin-right: 6px; font-weight: 600; }
/* Specs 2 columnas */
.specs { display: table; width: 100%; table-layout: fixed; margin-bottom: 6mm; }
.specs .col { display: table-cell; width: 50%; padding-right: 6mm; vertical-align: top; }
.specs .col:last-child { padding-right: 0; }
.specs-wrapper {
width: 180mm;
margin-left: 15mm; /* ← margen izquierdo real del A4 */
margin-right: auto; /* opcional */
color: #5c5c5c;
}
.align-with-text {
margin-left: 1mm;
margin-right: 0;
width: auto;
}
.specs {
display: table;
width: 100%;
table-layout: fixed;
margin-bottom: 6mm;
}
.specs .col {
display: table-cell;
width: 50%;
padding-right: 6mm;
vertical-align: top;
}
.specs .col:last-child {
padding-right: 0;
}
.block-title {
text-transform: uppercase;
font-weight: 700;
color: var(--accent);
font-size: 10pt;
font-size: 8pt;
margin: 2mm 0 1mm 0;
}
.kv { margin: 1mm 0; }
.kv span { color: var(--muted); display: inline-block; min-width: 55%; }
.kv b { font-weight: 600; }
.subblock { margin-top: 3mm; }
.services { margin: 0; padding-left: 14px; }
.services li { margin: 1mm 0; }
.kv {
margin: 1mm 0;
}
.kv span {
color: var(--muted);
display: inline-block;
min-width: 55%;
}
.kv b {
font-weight: 600;
}
.subblock {
margin-top: 3mm;
}
.services {
margin: 0;
padding-left: 14px;
}
.services li {
margin: 1mm 0;
}
/* Bloque marcapáginas */
.bookmark {
@ -100,8 +273,10 @@ html, body {
padding: 3mm;
background: #fff;
}
.bookmark .bk-title {
font-weight: 700; margin-bottom: 2mm;
font-weight: 700;
margin-bottom: 2mm;
}
/* Tabla de precios (tiradas) */
@ -111,6 +286,7 @@ html, body {
margin-top: 6mm;
font-size: 10.5pt;
}
.prices thead th {
text-align: left;
padding: 6px;
@ -118,27 +294,81 @@ html, body {
background: #eef8fe;
font-weight: 700;
}
.prices tbody td {
border-bottom: 1px solid var(--line);
padding: 6px;
}
.prices .col-tirada { width: 22%; font-weight: 700; }
.prices .col-tirada {
width: 22%;
font-weight: 700;
}
/* Footer */
.footer {
margin-top: 8mm;
position: fixed;
left: 14mm;
right: 14mm;
bottom: 18mm;
border-top: 1px solid var(--line);
padding-top: 4mm;
display: table;
width: 100%;
font-size: 9.5pt;
font-size: 7.5pt;
color: var(--muted);
z-index: 10; /* sobre la marca */
background: transparent;
}
.footer .address {
display: table-cell;
width: 45%;
}
.footer .privacy {
display: table-cell;
width: 55%;
}
.pv-title {
font-weight: 700;
margin-bottom: 1mm;
color: var(--ink);
}
.pv-text {
line-height: 1.25;
}
.page-count {
margin-top: 2mm;
text-align: right;
font-size: 9pt;
color: var(--muted);
}
.footer .address { display: table-cell; width: 45%; }
.footer .privacy { display: table-cell; width: 55%; }
.pv-title { font-weight: 700; margin-bottom: 1mm; color: var(--ink); }
.pv-text { line-height: 1.25; }
.page-count { margin-top: 2mm; text-align: right; font-size: 9pt; color: var(--muted); }
.page::after { content: counter(page); }
.pages::after { content: counter(pages); }
.page::after {
content: counter(page);
}
.pages::after {
content: counter(pages);
}
/* Caja a página completa SIN vw/vh y SIN z-index negativo */
.watermark {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0; /* ocupa toda la HOJA */
pointer-events: none;
z-index: 0; /* debajo del contenido */
}
.watermark img {
position: absolute;
top: 245mm; /* baja/sube (7085%) */
left: 155mm; /* desplaza a la derecha si quieres */
transform: translate(-50%, -50%) rotate(-15deg);
width: 60%; /* tamaño grande, ya no hay recorte por márgenes */
max-width: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB