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:
Kevin Papst
2018-09-21 01:27:56 +02:00
committed by GitHub
parent b035fc9ebd
commit 53f82a808b
121 changed files with 4094 additions and 770 deletions

Binary file not shown.

View File

@@ -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 %}

View 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 start_date start_timestamp end_date end_timestamp duration username description rate amount total
2 ${entry.begin} ${entry.begin_timestamp} ${entry.end} ${entry.end_timestamp} ${entry.duration} ${entry.user_name} ${entry.description} ${entry.rate} ${entry.amount} ${entry.total}

View File

@@ -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 %}

Binary file not shown.

Binary file not shown.

View File

@@ -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 %}