202 lines
5.4 KiB
HTML
202 lines
5.4 KiB
HTML
{% load i18n %}
|
|
<!DOCTYPE html>
|
|
<html lang="cs">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title>Faktura</title>
|
|
<style>
|
|
@import url("https://fonts.googleapis.com/css2?family=Ubuntu&display=swap");
|
|
|
|
:root {
|
|
--font-family: "Ubuntu", sans-serif;
|
|
--main-color: #333;
|
|
--secondary-color: #888;
|
|
--border-color: #ddd;
|
|
--background-color: #fff;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-family), sans-serif;
|
|
margin: 20px;
|
|
color: var(--main-color);
|
|
background-color: var(--background-color);
|
|
}
|
|
|
|
header {
|
|
text-align: left;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.parties ul {
|
|
list-style-type: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.parties li {
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.parties h2 {
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding-bottom: 8px;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.invoice-id {
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
#invoice {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
|
|
#invoice th,
|
|
#invoice td {
|
|
padding: 12px;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.invoice-total {
|
|
margin-top: 20px;
|
|
text-align: right;
|
|
}
|
|
|
|
.parties-section {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.parties {
|
|
width: 48%;
|
|
}
|
|
|
|
#invoice tbody tr {
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.small-col {
|
|
width: 5%;
|
|
}
|
|
|
|
.medium-col {
|
|
width: 15%;
|
|
}
|
|
|
|
.big-col {
|
|
width: 25%;
|
|
}
|
|
|
|
.right-align {
|
|
text-align: right;
|
|
}
|
|
|
|
footer {
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100%;
|
|
text-align: center;
|
|
left: 0;
|
|
right: 0;
|
|
padding: 0;
|
|
margin-top: 20px;
|
|
color: var(--main-color);
|
|
background-color: var(--background-color);
|
|
}
|
|
|
|
@media print {
|
|
@page {
|
|
size: auto;
|
|
margin: 0;
|
|
}
|
|
|
|
body {
|
|
margin: 10mm 10mm;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>{% trans "Invoice" %} <span class="invoice-id">{{ invoice.custom_id }}</span></h1>
|
|
</header>
|
|
|
|
<section class="parties-section">
|
|
<div class="parties">
|
|
<h2>{% trans "Supplier" %}</h2>
|
|
<ul>
|
|
{% with invoice.supplier_data as sd %}
|
|
<li>{{ sd.name }}</li>
|
|
<li>{{ sd.street }}</li>
|
|
<li>{{ sd.city }} - {{ sd.city_part }}, {{ sd.zip_code }}</li>
|
|
<p></p>
|
|
<li>{% trans "CIN" %}: {{ invoice.supplier.id }}</li>
|
|
{% if invoice.supplier.vat_id %}
|
|
<li>{% trans "VAT ID" %}: {{ invoice.supplier.vat_id }}</li>
|
|
{% endif %}
|
|
<p></p>
|
|
<li>{% trans "Bank Account" %}: TODO</li>
|
|
{% endwith %}
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="parties">
|
|
<h2>{% trans "Customer" %}</h2>
|
|
<ul>
|
|
{% with invoice.customer_data as cd %}
|
|
<li>{{ cd.name }}</li>
|
|
<li>{{ cd.street }}</li>
|
|
<li>{{ cd.city }} - {{ cd.city_part }}, {{ cd.zip_code }}</li>
|
|
<p></p>
|
|
<li>{% trans "CIN" %}: {{ invoice.customer.id }}</li>
|
|
{% if invoice.customer.vat_id %}
|
|
<li>{% trans "VAT ID" %}: {{ invoice.customer.vat_id }}</li>
|
|
{% endif %}
|
|
<p></p>
|
|
<li><strong>{% trans "Invoice date" %}:</strong> {{ invoice.invoice_date }}</li>
|
|
<li><strong>{% trans "Due date" %}:</strong> {{ invoice.due_date }}</li>
|
|
{% endwith %}
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>{% trans "Invoice details" %}</h2>
|
|
<table id="invoice">
|
|
<thead>
|
|
<tr>
|
|
<th class="small-col">{% trans "Amount" %}</th>
|
|
<th class="small-col">{% trans "Amount unit" %}</th>
|
|
<th class="big-col">{% trans "Description" %}</th>
|
|
<th class="medium-col right-align">{% trans "Price for amount" %}</th>
|
|
<th class="medium-col right-align">{% trans "Total" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for invoice_item in invoice.items.all %}
|
|
<tr>
|
|
<td>{{ invoice_item.amount.normalize }}</td>
|
|
<td>{{ invoice_item.amount_unit }}</td>
|
|
<td>{{ invoice_item.description }}</td>
|
|
<td class="right-align">{{ invoice_item.price_for_amount.normalize }} Kč</td>
|
|
<td class="right-align">{{ invoice_item.total_price.normalize }} Kč</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="invoice-total">
|
|
<p><strong>{% trans "Total" %}: {{ invoice.total_price.normalize }} Kč</strong></p>
|
|
</div>
|
|
</section>
|
|
|
|
<footer>
|
|
<p>Fyzická osoba zapsaná v živnostenském rejstříku.</p>
|
|
<p>Fakturu vygenerovala aplikace Facturio</p>
|
|
</footer>
|
|
</body>
|
|
</html>
|