Files
kimai/templates/invoice/renderer/service-date.pdf.twig
2026-04-13 21:22:06 +02:00

197 lines
8.4 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="{{ invoice['invoice.language'] }}">
<head>
<meta charset="utf-8">
<title>{{ invoice['invoice.number'] }}-{{ invoice['customer.company']|default(invoice['customer.name'])|u.snake }}</title>
<style>
{{ encore_entry_css_source('invoice-pdf')|raw }}
</style>
</head>
<body>
<!--mpdf
<htmlpageheader name="header">
<table class="header">
<tr>
<td class="text-small">
{{ invoice['template.company'] }} &ndash; {{ invoice['template.address']|nl2str(' ') }}
{% if invoice['template.country'] is not null %}
{% set country = invoice['template.country']|country_name(invoice['invoice.language']) %}
{% if country not in invoice['template.address'] %}
{{ country }}
{% endif %}
{% endif %}
{% if invoice['template.vat_id'] is not empty %}
&ndash; {{ 'vat_id'|trans }}: {{ invoice['template.vat_id'] }}
{% endif %}
</td>
<td class="text-small text-right">
{{ 'export.page_of'|trans({'%page%': '{PAGENO}', '%pages%': '{nb}'}) }}
</td>
</tr>
</table>
</htmlpageheader>
<sethtmlpageheader name="header" page="ALL" value="on" show-this-page="1" />
<htmlpagefooter name="footer">
<table class="footer text-small">
<tr>
<td style="width: 33%">
<strong>{{ 'address'|trans }}</strong>
<br>
{{ invoice['template.company'] }}<br>
{{ invoice['template.address']|nl2br }}
{% if invoice['template.country'] is not null %}
{% set country = invoice['template.country']|country_name(invoice['invoice.language']) %}
{% if country not in invoice['template.address'] %}
<br> {{ country }}
{% endif %}
{% endif %}
</td>
<td class="text-center">
<strong>{{ 'invoice_bank_account'|trans }}</strong>
<br>
{{ invoice['template.payment_details']|nl2br }}
</td>
<td class="text-right" style="width: 33%">
<strong>{{ 'contact'|trans }}</strong>
<br>
{{ invoice['template.contact']|nl2br }}
</td>
</tr>
</table>
</htmlpagefooter>
<sethtmlpagefooter page="ALL" value="on" name="footer" show-this-page="1" />
mpdf-->
<table class="addresses">
<tr>
<td>
<strong>{{ invoice['customer.company']|default(invoice['customer.name']) }}</strong><br>
{{ invoice['customer.address']|nl2br }}
{% set country = invoice['customer.country']|country_name(invoice['invoice.language']) %}
{% if country not in invoice['customer.address'] %}
<br> {{ country }}
{% endif %}
</td>
<td class="text-right">
{% set classLeft = 'text-left' %}
{% set classRight = 'text-right text-nowrap padding-left' %}
<table style="width: 240px">
<tr>
<td class="{{ classLeft }}">{{ 'date'|trans }}</td>
<td class="{{ classRight }}">{{ invoice['invoice.date'] }}</td>
</tr>
<tr>
<td class="{{ classLeft }}">{{ 'invoice.service_date'|trans }}</td>
<td class="{{ classRight }}">{{ invoice['query.end_month'] }} {{ invoice['query.end_year'] }}</td>
</tr>
<tr>
<td class="{{ classLeft }}">{{ 'invoice.number'|trans }}</td>
<td class="{{ classRight }}">{{ invoice['invoice.number'] }}</td>
</tr>
<tr>
<td class="{{ classLeft }}">{{ 'invoice.due_days'|trans }}</td>
<td class="{{ classRight }}">{{ invoice['invoice.due_date'] }}</td>
</tr>
{% if invoice['customer.number'] is not empty %}
<tr>
<td class="{{ classLeft }}">{{ 'number'|trans }}</td>
<td class="{{ classRight }}">{{ invoice['customer.number'] }}</td>
</tr>
{% endif %}
{% if invoice['query.project.order_number'] is defined and invoice['query.project.order_number'] is not empty %}
<tr>
<td class="{{ classLeft }}">{{ 'orderNumber'|trans }}</td>
<td class="{{ classRight }}">{{ invoice['query.project.order_number'] }}</td>
</tr>
{% endif %}
{% if invoice['customer.vat_id'] is not empty %}
<tr>
<td class="{{ classLeft }}">{{ 'vat_id'|trans }}</td>
<td class="{{ classRight }}">{{ invoice['customer.vat_id'] }}</td>
</tr>
{% endif %}
</table>
</td>
</tr>
</table>
<h2 style="margin-top: 60px">{{ invoice['template.title'] }}</h2>
{% if invoice['customer.invoice_text'] is not empty%}
<p>{{ invoice['customer.invoice_text']|md2html }}</p>
{% endif %}
<table class="items">
<thead>
<tr>
<th class="first">{{ 'description'|trans }}</th>
<th class="text-right">{{ 'unit_price'|trans }}</th>
<th class="text-right">{{ 'amount'|trans }}</th>
<th class="last text-right">{{ 'total_rate'|trans }}</th>
</tr>
</thead>
<tbody>
{% for invoiceLineItem in entries %}
<!-- CONTENT_PART -->
<tr>
<td class="first">
{% if invoiceLineItem['entry.description'] is not empty %}
{{ invoiceLineItem['entry.description']|nl2br }}
{% else %}
{% if invoiceLineItem['entry.activity'] is defined %}
{{ invoiceLineItem['entry.activity'] }} /
{% endif %}
{{ invoiceLineItem['entry.project'] }}
{% endif %}
</td>
<td class="text-right text-nowrap">{{ invoiceLineItem['entry.rate'] }}</td>
<td class="text-right text-nowrap">{{ invoiceLineItem['entry.amount'] }}</td>
<td class="last text-right text-nowrap">{{ invoiceLineItem['entry.total'] }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="3" class="text-right">
{{ 'invoice.subtotal'|trans }}
</td>
<td class="last text-right">{{ invoice['invoice.subtotal'] }}</td>
</tr>
{% for taxRow in invoice['invoice.tax_rows'] %}
{% if taxRow['show'] %}
<tr>
<td colspan="3" class="text-right">
{{ taxRow['name']|trans }} ({{ taxRow['rate'] }}%)
{% if taxRow['note'] is not null %}
<sup>[{{ taxRow['counter'] }}]</sup>
{% endif %}
</td>
<td class="last text-right">{{ taxRow['amount']|money(taxRow['currency']) }}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td colspan="3" class="text-right text-nowrap">
<strong>{{ 'invoice.total'|trans }}</strong>
</td>
<td class="last text-right">
<strong>{{ invoice['invoice.total'] }}</strong>
</td>
</tr>
</tfoot>
</table>
{% for taxRow in invoice['invoice.tax_rows'] %}
{% if taxRow['note'] is not null %}
<p>
<sup>[{{ taxRow['counter'] }}]</sup>
{{ taxRow['note']|trans }}
</p>
{% endif %}
{% endfor %}
{% if invoice['template.payment_terms'] is not empty %}
{{ invoice['template.payment_terms']|md2html }}
{% endif %}
</body>
</html>