improved invoices with new renderer (#306)
* added docx renderer and demo template * added csv renderer and demo template * added xlsx renderer and demo template * added ods renderer and demo template * added user calculator * added invoice documentation
This commit is contained in:
BIN
templates/invoice/renderer/company.docx
Normal file
BIN
templates/invoice/renderer/company.docx
Normal file
Binary file not shown.
@@ -1,3 +1,6 @@
|
||||
{% extends 'invoice/layout.html.twig' %}
|
||||
|
||||
{% block invoice %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="page-header">
|
||||
@@ -108,11 +111,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row no-print">
|
||||
<div class="col-xs-12">
|
||||
<button type="button" class="btn btn-success pull-right" onclick="window.print();return false;">
|
||||
<i class="{{ 'print'|icon }}"></i> {{ 'button.print'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
2
templates/invoice/renderer/export.csv
Normal file
2
templates/invoice/renderer/export.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
start_date,start_timestamp,end_date,end_timestamp,duration,username,description,rate,amount,total
|
||||
${entry.begin},${entry.begin_timestamp},${entry.end},${entry.end_timestamp},${entry.duration},${entry.user_name},${entry.description},${entry.rate},${entry.amount},${entry.total}
|
||||
|
@@ -1,5 +1,10 @@
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{# You can overrwite these settings in your config/packages.local.yaml under the key "twig.globals.company" #}
|
||||
|
||||
{% extends 'invoice/layout.html.twig' %}
|
||||
|
||||
{% block invoice %}
|
||||
|
||||
{# You can overwrite these settings in your config/packages.local.yaml under the key "twig.globals.company" #}
|
||||
{% set company = company|default({
|
||||
name: 'Kimai Inc.',
|
||||
homepage: 'www.kimai.org',
|
||||
@@ -137,11 +142,4 @@
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row no-print">
|
||||
<div class="col-xs-12">
|
||||
<button type="button" class="btn btn-success pull-right" onclick="window.print();return false;">
|
||||
<i class="{{ 'print'|icon }}"></i> {{ 'button.print'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
BIN
templates/invoice/renderer/open-spreadsheet.ods
Normal file
BIN
templates/invoice/renderer/open-spreadsheet.ods
Normal file
Binary file not shown.
BIN
templates/invoice/renderer/spreadsheet.xlsx
Normal file
BIN
templates/invoice/renderer/spreadsheet.xlsx
Normal file
Binary file not shown.
@@ -1,5 +1,7 @@
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% extends 'invoice/layout.html.twig' %}
|
||||
|
||||
{% block invoice %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="page-header">
|
||||
@@ -23,7 +25,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width:50%">{{ 'label.date'|trans }}</th>
|
||||
<td contenteditable="true">{{ model.query.end|month_name|trans }} {{ model.query.end|date('Y') }}</td>
|
||||
<td contenteditable="true">
|
||||
{% if model.query.begin|date('m') != model.query.end|date('m') or model.query.begin|date('Y') != model.query.end|date('Y') %}
|
||||
{{ model.query.begin|date_short }} - {{ model.query.end|date_short }}
|
||||
{% else %}
|
||||
{{ model.query.end|month_name|trans }} {{ model.query.end|date('Y') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ 'label.customer'|trans }}</th>
|
||||
@@ -50,6 +58,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'label.date'|trans }}</th>
|
||||
{% if model.query.user is empty %}
|
||||
<th>{{ 'label.user'|trans }}</th>
|
||||
{% endif %}
|
||||
<th>{{ 'label.activity'|trans }}</th>
|
||||
<th>{{ 'label.hours'|trans }}</th>
|
||||
</tr>
|
||||
@@ -58,6 +69,9 @@
|
||||
{% for entry in model.calculator.entries %}
|
||||
<tr>
|
||||
<td>{{ entry.begin|date_short }}</td>
|
||||
{% if model.query.user is empty %}
|
||||
<td>{{ widgets.username(entry.user) }}</td>
|
||||
{% endif %}
|
||||
<td>{{ entry.activity.name }} / {{ entry.activity.project.name }}</td>
|
||||
<td>{{ entry.duration|duration }}</td>
|
||||
</tr>
|
||||
@@ -99,11 +113,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row no-print">
|
||||
<div class="col-xs-12">
|
||||
<button type="button" class="btn btn-success pull-right" onclick="window.print();return false;">
|
||||
<i class="{{ 'print'|icon }}"></i> {{ 'button.print'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user