|
|
|
@@ -284,6 +284,7 @@ export default async function invoicesPdfRoutes(
|
|
|
|
> | null;
|
|
|
|
> | null;
|
|
|
|
|
|
|
|
|
|
|
|
let orderNumber = "";
|
|
|
|
let orderNumber = "";
|
|
|
|
|
|
|
|
let orderDate = "";
|
|
|
|
if (invoice.order_id) {
|
|
|
|
if (invoice.order_id) {
|
|
|
|
const orderRow = await prisma.orders.findUnique({
|
|
|
|
const orderRow = await prisma.orders.findUnique({
|
|
|
|
where: { id: invoice.order_id },
|
|
|
|
where: { id: invoice.order_id },
|
|
|
|
@@ -299,6 +300,9 @@ export default async function invoicesPdfRoutes(
|
|
|
|
orderRow.customer_order_number || orderRow.order_number || "",
|
|
|
|
orderRow.customer_order_number || orderRow.order_number || "",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
if (orderRow.created_at) {
|
|
|
|
|
|
|
|
orderDate = formatDate(orderRow.created_at);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -491,14 +495,14 @@ export default async function invoicesPdfRoutes(
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
@page {
|
|
|
|
@page {
|
|
|
|
size: A4;
|
|
|
|
size: A4;
|
|
|
|
margin: 12mm 15mm 15mm 15mm;
|
|
|
|
margin: 8mm 12mm 10mm 12mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
html, body {
|
|
|
|
html, body {
|
|
|
|
font-family: "Segoe UI", Tahoma, Arial, sans-serif;
|
|
|
|
font-family: "Segoe UI", Tahoma, Arial, sans-serif;
|
|
|
|
font-size: 9pt;
|
|
|
|
font-size: 10pt;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
width: 180mm;
|
|
|
|
width: 186mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.invoice-page {
|
|
|
|
.invoice-page {
|
|
|
|
@@ -509,82 +513,35 @@ export default async function invoicesPdfRoutes(
|
|
|
|
.invoice-content { flex: 1 1 auto; }
|
|
|
|
.invoice-content { flex: 1 1 auto; }
|
|
|
|
.invoice-footer {
|
|
|
|
.invoice-footer {
|
|
|
|
flex-shrink: 0;
|
|
|
|
flex-shrink: 0;
|
|
|
|
page-break-inside: avoid;
|
|
|
|
|
|
|
|
break-inside: avoid;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.accent { color: #de3a3a; }
|
|
|
|
.accent { color: #de3a3a; }
|
|
|
|
|
|
|
|
|
|
|
|
/* Hlavicka */
|
|
|
|
/* ── Hlavicka ── */
|
|
|
|
.invoice-header {
|
|
|
|
.invoice-header {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: flex-start;
|
|
|
|
align-items: center;
|
|
|
|
margin-bottom: 0;
|
|
|
|
margin-bottom: 1mm;
|
|
|
|
padding-bottom: 1mm;
|
|
|
|
padding-bottom: 1mm;
|
|
|
|
|
|
|
|
border-bottom: 2pt solid #de3a3a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.invoice-header .left {
|
|
|
|
.invoice-header .left {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
align-items: flex-start;
|
|
|
|
align-items: center;
|
|
|
|
gap: 3mm;
|
|
|
|
gap: 3mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.logo-header {
|
|
|
|
.logo-header { text-align: left; }
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.company-title {
|
|
|
|
.company-title {
|
|
|
|
font-size: 12pt;
|
|
|
|
font-size: 12pt;
|
|
|
|
font-weight: 700;
|
|
|
|
font-weight: 700;
|
|
|
|
margin-top: 2mm;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.invoice-title {
|
|
|
|
.invoice-title {
|
|
|
|
font-size: 10pt;
|
|
|
|
font-size: 13pt;
|
|
|
|
font-weight: 700;
|
|
|
|
font-weight: 700;
|
|
|
|
color: #de3a3a;
|
|
|
|
color: #de3a3a;
|
|
|
|
text-align: right;
|
|
|
|
text-align: right;
|
|
|
|
margin-top: 2mm;
|
|
|
|
letter-spacing: 0.03em;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Adresy - dva sloupce, stejna vyska */
|
|
|
|
|
|
|
|
.addresses-row {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
gap: 8mm;
|
|
|
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.addresses-row .address-block {
|
|
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
padding-bottom: 2mm;
|
|
|
|
|
|
|
|
border-bottom: 0.5pt solid #e0e0e0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Detaily pod adresami */
|
|
|
|
|
|
|
|
.details-row {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
gap: 8mm;
|
|
|
|
|
|
|
|
margin-bottom: 3mm;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.details-row .col { flex: 1; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Adresy - styl z nabidek */
|
|
|
|
|
|
|
|
.address-block {
|
|
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.address-label {
|
|
|
|
|
|
|
|
font-size: 8pt;
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
color: #646464;
|
|
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.address-name {
|
|
|
|
|
|
|
|
font-size: 9pt;
|
|
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
|
|
color: #1a1a1a;
|
|
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.address-line {
|
|
|
|
|
|
|
|
font-size: 8.5pt;
|
|
|
|
|
|
|
|
color: #1a1a1a;
|
|
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
.logo {
|
|
|
|
@@ -593,74 +550,87 @@ export default async function invoicesPdfRoutes(
|
|
|
|
object-fit: contain;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Separator */
|
|
|
|
/* ── Adresy ── */
|
|
|
|
.header-separator {
|
|
|
|
.header-grid {
|
|
|
|
border: none;
|
|
|
|
border: 0.5pt solid #d0d0d0;
|
|
|
|
border-top: 0.5pt solid #e0e0e0;
|
|
|
|
border-collapse: collapse;
|
|
|
|
margin: 2mm 0 3mm 0;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
margin-bottom: 1mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-grid td {
|
|
|
|
/* Banka */
|
|
|
|
padding: 2mm 3mm;
|
|
|
|
.bank-box {
|
|
|
|
border: 0.5pt solid #d0d0d0;
|
|
|
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
|
|
|
width: 50%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-grid td.addr-customer {
|
|
|
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-grid td.details-bank {
|
|
|
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.address-label {
|
|
|
|
font-size: 8pt;
|
|
|
|
font-size: 8pt;
|
|
|
|
line-height: 1.4;
|
|
|
|
font-weight: 700;
|
|
|
|
padding-top: 2mm;
|
|
|
|
color: #de3a3a;
|
|
|
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
|
|
|
letter-spacing: 0.08em;
|
|
|
|
|
|
|
|
margin-bottom: 1mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bank-box .lbl {
|
|
|
|
.address-name {
|
|
|
|
font-weight: 600;
|
|
|
|
font-size: 10pt;
|
|
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
display: inline-block;
|
|
|
|
line-height: 1.3;
|
|
|
|
min-width: 16mm;
|
|
|
|
margin-bottom: 1mm;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.address-line {
|
|
|
|
|
|
|
|
font-size: 9pt;
|
|
|
|
|
|
|
|
color: #444;
|
|
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Datumy */
|
|
|
|
/* ── Detaily (banka + datumy) — inside header-grid ── */
|
|
|
|
.dates-box {
|
|
|
|
|
|
|
|
font-size: 8pt;
|
|
|
|
.info-row {
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
|
|
padding-top: 2mm;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.dates-row {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
align-items: baseline;
|
|
|
|
margin-bottom: 0.5mm;
|
|
|
|
font-size: 9pt;
|
|
|
|
|
|
|
|
padding: 1mm 0;
|
|
|
|
|
|
|
|
border-bottom: 0.5pt solid #f0f0f0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.dates-row .lbl {
|
|
|
|
.info-row:last-child { border-bottom: none; }
|
|
|
|
flex: 1;
|
|
|
|
.info-row .lbl {
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #666;
|
|
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
margin-right: 3mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.dates-row .val {
|
|
|
|
.info-row .val {
|
|
|
|
font-weight: 600;
|
|
|
|
font-weight: 600;
|
|
|
|
min-width: 22mm;
|
|
|
|
color: #1a1a1a;
|
|
|
|
text-align: center;
|
|
|
|
text-align: right;
|
|
|
|
padding: 0.5mm 2mm;
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* VS/KS blok */
|
|
|
|
/* VS/KS blok */
|
|
|
|
.vs-block {
|
|
|
|
.vs-block {
|
|
|
|
font-size: 8pt;
|
|
|
|
font-size: 9pt;
|
|
|
|
line-height: 1.4;
|
|
|
|
line-height: 1.4;
|
|
|
|
padding-top: 2mm;
|
|
|
|
padding-top: 2mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Konecny prijemce */
|
|
|
|
/* ── Polozky ── */
|
|
|
|
.recipient-box {
|
|
|
|
|
|
|
|
font-size: 8pt;
|
|
|
|
|
|
|
|
margin-top: 2mm;
|
|
|
|
|
|
|
|
padding-top: 2mm;
|
|
|
|
|
|
|
|
border-top: 0.5pt solid #e0e0e0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.recipient-box .lbl {
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
font-style: italic;
|
|
|
|
|
|
|
|
color: #646464;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Polozky tabulka - styl z nabidek */
|
|
|
|
|
|
|
|
.billing-label {
|
|
|
|
.billing-label {
|
|
|
|
font-weight: 600;
|
|
|
|
font-weight: 700;
|
|
|
|
color: #de3a3a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
font-size: 8.5pt;
|
|
|
|
font-size: 10pt;
|
|
|
|
padding: 3px 5px;
|
|
|
|
padding: 2mm 0 1mm 0;
|
|
|
|
|
|
|
|
border-bottom: 1.5pt solid #de3a3a;
|
|
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
|
|
|
letter-spacing: 0.03em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
table.items {
|
|
|
|
table.items {
|
|
|
|
@@ -671,20 +641,18 @@ export default async function invoicesPdfRoutes(
|
|
|
|
margin-bottom: 2mm;
|
|
|
|
margin-bottom: 2mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
table.items thead th {
|
|
|
|
table.items thead th {
|
|
|
|
font-size: 8pt;
|
|
|
|
font-size: 8.5pt;
|
|
|
|
font-weight: 600;
|
|
|
|
font-weight: 600;
|
|
|
|
color: #646464;
|
|
|
|
color: #646464;
|
|
|
|
padding: 6px 8px;
|
|
|
|
padding: 4px 4px;
|
|
|
|
text-align: left;
|
|
|
|
text-align: left;
|
|
|
|
letter-spacing: 0.02em;
|
|
|
|
border-bottom: 0.5pt solid #d0d0d0;
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
|
|
|
border-bottom: 1pt solid #1a1a1a;
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
table.items thead th.center { text-align: center; }
|
|
|
|
table.items thead th.center { text-align: center; }
|
|
|
|
table.items thead th.right { text-align: right; }
|
|
|
|
table.items thead th.right { text-align: right; }
|
|
|
|
table.items tbody td {
|
|
|
|
table.items tbody td {
|
|
|
|
padding: 5px 8px;
|
|
|
|
padding: 4px 4px;
|
|
|
|
border-bottom: 0.5pt solid #e0e0e0;
|
|
|
|
border-bottom: 0.5pt solid #e0e0e0;
|
|
|
|
vertical-align: middle;
|
|
|
|
vertical-align: middle;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
@@ -695,10 +663,10 @@ export default async function invoicesPdfRoutes(
|
|
|
|
table.items tbody td.row-num {
|
|
|
|
table.items tbody td.row-num {
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
color: #969696;
|
|
|
|
color: #969696;
|
|
|
|
font-size: 8pt;
|
|
|
|
font-size: 9pt;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
table.items tbody td.desc {
|
|
|
|
table.items tbody td.desc {
|
|
|
|
font-size: 9.5pt;
|
|
|
|
font-size: 9pt;
|
|
|
|
font-weight: 600;
|
|
|
|
font-weight: 600;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -720,7 +688,7 @@ export default async function invoicesPdfRoutes(
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: baseline;
|
|
|
|
align-items: baseline;
|
|
|
|
font-size: 8.5pt;
|
|
|
|
font-size: 9.5pt;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
margin-bottom: 2mm;
|
|
|
|
margin-bottom: 2mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -732,7 +700,7 @@ export default async function invoicesPdfRoutes(
|
|
|
|
align-items: baseline;
|
|
|
|
align-items: baseline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.totals .grand .label {
|
|
|
|
.totals .grand .label {
|
|
|
|
font-size: 9.5pt;
|
|
|
|
font-size: 10.5pt;
|
|
|
|
font-weight: 400;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
align-self: center;
|
|
|
|
align-self: center;
|
|
|
|
@@ -746,14 +714,14 @@ export default async function invoicesPdfRoutes(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.totals .currency-note {
|
|
|
|
.totals .currency-note {
|
|
|
|
text-align: right;
|
|
|
|
text-align: right;
|
|
|
|
font-size: 7.5pt;
|
|
|
|
font-size: 8pt;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
margin-top: 2mm;
|
|
|
|
margin-top: 2mm;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Vystavil */
|
|
|
|
/* Vystavil */
|
|
|
|
.issued-by {
|
|
|
|
.issued-by {
|
|
|
|
font-size: 8pt;
|
|
|
|
font-size: 9pt;
|
|
|
|
margin: 2mm 0;
|
|
|
|
margin: 2mm 0;
|
|
|
|
line-height: 1.4;
|
|
|
|
line-height: 1.4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -761,7 +729,7 @@ export default async function invoicesPdfRoutes(
|
|
|
|
|
|
|
|
|
|
|
|
/* Upozorneni */
|
|
|
|
/* Upozorneni */
|
|
|
|
.notice {
|
|
|
|
.notice {
|
|
|
|
font-size: 7pt;
|
|
|
|
font-size: 8pt;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
margin: 2mm 0;
|
|
|
|
margin: 2mm 0;
|
|
|
|
line-height: 1.3;
|
|
|
|
line-height: 1.3;
|
|
|
|
@@ -783,11 +751,11 @@ export default async function invoicesPdfRoutes(
|
|
|
|
|
|
|
|
|
|
|
|
.recap-section table {
|
|
|
|
.recap-section table {
|
|
|
|
border-collapse: collapse;
|
|
|
|
border-collapse: collapse;
|
|
|
|
font-size: 8pt;
|
|
|
|
font-size: 9pt;
|
|
|
|
flex: 1;
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.recap-section table th {
|
|
|
|
.recap-section table th {
|
|
|
|
font-size: 7.5pt;
|
|
|
|
font-size: 8pt;
|
|
|
|
font-weight: 600;
|
|
|
|
font-weight: 600;
|
|
|
|
color: #555;
|
|
|
|
color: #555;
|
|
|
|
padding: 3px 6px;
|
|
|
|
padding: 3px 6px;
|
|
|
|
@@ -801,7 +769,7 @@ export default async function invoicesPdfRoutes(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.recap-section table td.center { text-align: center; }
|
|
|
|
.recap-section table td.center { text-align: center; }
|
|
|
|
.recap-section table td.cnb-rate {
|
|
|
|
.recap-section table td.cnb-rate {
|
|
|
|
font-size: 7pt;
|
|
|
|
font-size: 8pt;
|
|
|
|
color: #888;
|
|
|
|
color: #888;
|
|
|
|
text-align: right;
|
|
|
|
text-align: right;
|
|
|
|
border-bottom: none;
|
|
|
|
border-bottom: none;
|
|
|
|
@@ -811,13 +779,14 @@ export default async function invoicesPdfRoutes(
|
|
|
|
/* Prevzal / razitko */
|
|
|
|
/* Prevzal / razitko */
|
|
|
|
.footer-row {
|
|
|
|
.footer-row {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
margin-top: 4mm;
|
|
|
|
margin-top: 4mm;
|
|
|
|
font-size: 8pt;
|
|
|
|
font-size: 9pt;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-row .col {
|
|
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
border-top: 0.5pt solid #aaa;
|
|
|
|
border-top: 0.5pt solid #aaa;
|
|
|
|
padding-top: 2mm;
|
|
|
|
padding-top: 2mm;
|
|
|
|
|
|
|
|
min-height: 15mm;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.footer-row .col {
|
|
|
|
font-weight: 600;
|
|
|
|
font-weight: 600;
|
|
|
|
color: #555;
|
|
|
|
color: #555;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -825,13 +794,13 @@ export default async function invoicesPdfRoutes(
|
|
|
|
/* Poznamky */
|
|
|
|
/* Poznamky */
|
|
|
|
.invoice-notes {
|
|
|
|
.invoice-notes {
|
|
|
|
margin-top: 4mm;
|
|
|
|
margin-top: 4mm;
|
|
|
|
font-size: 9pt;
|
|
|
|
font-size: 10pt;
|
|
|
|
line-height: 1.5;
|
|
|
|
line-height: 1.5;
|
|
|
|
color: #1a1a1a;
|
|
|
|
color: #1a1a1a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.invoice-notes-label {
|
|
|
|
.invoice-notes-label {
|
|
|
|
font-weight: 600;
|
|
|
|
font-weight: 600;
|
|
|
|
font-size: 8pt;
|
|
|
|
font-size: 9pt;
|
|
|
|
text-transform: uppercase;
|
|
|
|
text-transform: uppercase;
|
|
|
|
color: #555;
|
|
|
|
color: #555;
|
|
|
|
margin-bottom: 1mm;
|
|
|
|
margin-bottom: 1mm;
|
|
|
|
@@ -898,59 +867,54 @@ ${indentCSS}
|
|
|
|
<div class="invoice-title">${escapeHtml(t.heading)} ${invoiceNumber}</div>
|
|
|
|
<div class="invoice-title">${escapeHtml(t.heading)} ${invoiceNumber}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<hr class="header-separator" />
|
|
|
|
<!-- Dodavatel / Odberatel + Banka / Datumy -->
|
|
|
|
|
|
|
|
<table class="header-grid" cellspacing="0">
|
|
|
|
<!-- Dodavatel / Odberatel - stejna vyska -->
|
|
|
|
<tr>
|
|
|
|
<div class="addresses-row">
|
|
|
|
<td>
|
|
|
|
<div class="address-block">
|
|
|
|
<div class="address-label">${escapeHtml(t.supplier)}</div>
|
|
|
|
<div class="address-label">${escapeHtml(t.supplier)}</div>
|
|
|
|
<div class="address-name">${escapeHtml(supp.name)}</div>
|
|
|
|
<div class="address-name">${escapeHtml(supp.name)}</div>
|
|
|
|
${suppLinesHtml}
|
|
|
|
${suppLinesHtml}
|
|
|
|
</td>
|
|
|
|
</div>
|
|
|
|
<td class="addr-customer">
|
|
|
|
<div class="address-block">
|
|
|
|
<div class="address-label">${escapeHtml(t.customer)}</div>
|
|
|
|
<div class="address-label">${escapeHtml(t.customer)}</div>
|
|
|
|
<div class="address-name">${escapeHtml(cust.name)}</div>
|
|
|
|
<div class="address-name">${escapeHtml(cust.name)}</div>
|
|
|
|
${custLinesHtml}
|
|
|
|
${custLinesHtml}
|
|
|
|
</td>
|
|
|
|
</div>
|
|
|
|
</tr>
|
|
|
|
</div>
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td class="details-bank">
|
|
|
|
<!-- Banka + VS / Datumy -->
|
|
|
|
<div class="info-row"><span class="lbl">${escapeHtml(t.bank)}</span> <span class="val">${escapeHtml(invoice.bank_name)}</span></div>
|
|
|
|
<div class="details-row">
|
|
|
|
<div class="info-row"><span class="lbl">${escapeHtml(t.swift)}</span> <span class="val">${escapeHtml(invoice.bank_swift)}</span></div>
|
|
|
|
<div class="col">
|
|
|
|
<div class="info-row"><span class="lbl">${escapeHtml(t.iban)}</span> <span class="val">${escapeHtml(invoice.bank_iban)}</span></div>
|
|
|
|
<div class="bank-box">
|
|
|
|
<div class="info-row"><span class="lbl">${escapeHtml(t.account_no)}</span> <span class="val">${escapeHtml(invoice.bank_account)}</span></div>
|
|
|
|
<span class="lbl">${escapeHtml(t.bank)}</span> ${escapeHtml(invoice.bank_name)}<br>
|
|
|
|
<div class="vs-block">
|
|
|
|
<span class="lbl">${escapeHtml(t.swift)}</span> ${escapeHtml(invoice.bank_swift)}<br>
|
|
|
|
${escapeHtml(t.var_symbol)} <strong>${invoiceNumber}</strong>
|
|
|
|
<span class="lbl">${escapeHtml(t.iban)}</span> ${escapeHtml(invoice.bank_iban)}<br>
|
|
|
|
${escapeHtml(t.const_symbol)} <strong>${escapeHtml(invoice.constant_symbol)}</strong>
|
|
|
|
<span class="lbl">${escapeHtml(t.account_no)}</span> ${escapeHtml(invoice.bank_account)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<div class="vs-block">
|
|
|
|
<td>
|
|
|
|
${escapeHtml(t.var_symbol)} <strong>${invoiceNumber}</strong>
|
|
|
|
<div class="info-row"><span class="lbl">${escapeHtml(t.issue_date)}</span> <span class="val">${escapeHtml(formatDate(invoice.issue_date))}</span></div>
|
|
|
|
${escapeHtml(t.const_symbol)} <strong>${escapeHtml(invoice.constant_symbol)}</strong><br>
|
|
|
|
<div class="info-row"><span class="lbl">${escapeHtml(t.due_date)}</span> <span class="val">${escapeHtml(formatDate(invoice.due_date))}</span></div>
|
|
|
|
${orderNumber ? `${escapeHtml(t.order_no)} ${orderNumber}` : ""}
|
|
|
|
<div class="info-row"><span class="lbl">${escapeHtml(t.tax_date)}</span> <span class="val">${escapeHtml(formatDate(invoice.tax_date))}</span></div>
|
|
|
|
</div>
|
|
|
|
<div class="info-row"><span class="lbl">${escapeHtml(t.payment_method)}</span> <span class="val">${escapeHtml(invoice.payment_method)}</span></div>
|
|
|
|
</div>
|
|
|
|
${orderNumber ? `<div class="info-row"><span class="lbl">${lang === "cs" ? "Objednávka č.:" : "Order no.:"}</span> <span class="val">${orderNumber}</span></div>` : ""}
|
|
|
|
<div class="col">
|
|
|
|
${orderDate ? `<div class="info-row"><span class="lbl">${lang === "cs" ? "Objednávka ze dne:" : "Order date:"}</span> <span class="val">${escapeHtml(orderDate)}</span></div>` : ""}
|
|
|
|
<div class="dates-box">
|
|
|
|
</td>
|
|
|
|
<div class="dates-row"><span class="lbl">${escapeHtml(t.issue_date)}</span> <span class="val">${escapeHtml(formatDate(invoice.issue_date))}</span></div>
|
|
|
|
</tr>
|
|
|
|
<div class="dates-row"><span class="lbl">${escapeHtml(t.due_date)}</span> <span class="val">${escapeHtml(formatDate(invoice.due_date))}</span></div>
|
|
|
|
</table>
|
|
|
|
<div class="dates-row"><span class="lbl">${escapeHtml(t.tax_date)}</span> <span class="val">${escapeHtml(formatDate(invoice.tax_date))}</span></div>
|
|
|
|
|
|
|
|
<div class="dates-row"><span class="lbl">${escapeHtml(t.payment_method)}</span> <span class="val">${escapeHtml(invoice.payment_method)}</span></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Polozky -->
|
|
|
|
<!-- Polozky -->
|
|
|
|
<div class="billing-label">${escapeHtml(invoice.billing_text || t.billing)}</div>
|
|
|
|
<div class="billing-label">${escapeHtml(invoice.billing_text || t.billing)}</div>
|
|
|
|
<table class="items">
|
|
|
|
<table class="items">
|
|
|
|
<thead>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<th class="center" style="width:4%">${escapeHtml(t.col_no)}</th>
|
|
|
|
<th class="center" style="width:3%">${escapeHtml(t.col_no)}</th>
|
|
|
|
<th style="width:28%">${escapeHtml(t.col_desc)}</th>
|
|
|
|
<th style="width:36%">${escapeHtml(t.col_desc)}</th>
|
|
|
|
<th class="center" style="width:12%">${escapeHtml(t.col_qty)}</th>
|
|
|
|
<th class="center" style="width:10%">${escapeHtml(t.col_qty)}</th>
|
|
|
|
<th class="right" style="width:11%">${escapeHtml(t.col_unit_price)}</th>
|
|
|
|
<th class="right" style="width:10%">${escapeHtml(t.col_unit_price)}</th>
|
|
|
|
<th class="right" style="width:11%">${escapeHtml(t.col_price)}</th>
|
|
|
|
<th class="right" style="width:10%">${escapeHtml(t.col_price)}</th>
|
|
|
|
<th class="center" style="width:7%">${escapeHtml(t.col_vat_pct)}</th>
|
|
|
|
<th class="center" style="width:5%">${escapeHtml(t.col_vat_pct)}</th>
|
|
|
|
<th class="right" style="width:11%">${escapeHtml(t.col_vat)}</th>
|
|
|
|
<th class="right" style="width:10%">${escapeHtml(t.col_vat)}</th>
|
|
|
|
<th class="right" style="width:16%">${escapeHtml(t.col_total)}</th>
|
|
|
|
<th class="right" style="width:16%">${escapeHtml(t.col_total)}</th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
@@ -1044,6 +1008,7 @@ ${indentCSS}
|
|
|
|
? new Date(invoice.issue_date)
|
|
|
|
? new Date(invoice.issue_date)
|
|
|
|
: new Date();
|
|
|
|
: new Date();
|
|
|
|
const saveMode = query.save === "1";
|
|
|
|
const saveMode = query.save === "1";
|
|
|
|
|
|
|
|
nasFinancialsManager.cleanIssuedInvoice(invoice.invoice_number!);
|
|
|
|
const pdfPromise = htmlToPdf(html)
|
|
|
|
const pdfPromise = htmlToPdf(html)
|
|
|
|
.then((pdfBuffer) => {
|
|
|
|
.then((pdfBuffer) => {
|
|
|
|
nasFinancialsManager.saveIssuedInvoicePdf(
|
|
|
|
nasFinancialsManager.saveIssuedInvoicePdf(
|
|
|
|
|