mirror of
https://github.com/kevinpapst/kimai2.git
synced 2025-03-18 06:42:53 +00:00
fix duration and rate for html invoices (#414)
This commit is contained in:
parent
540318fcd0
commit
07cceca67e
2 changed files with 23 additions and 4 deletions
templates/invoice/renderer
|
@ -64,11 +64,20 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for entry in model.calculator.entries %}
|
||||
{% set duration = entry.duration|duration() %}
|
||||
{% if entry.fixedRate is not null %}
|
||||
{% set rate = entry.fixedRate %}
|
||||
{% set duration = 1 %}
|
||||
{% elseif entry.hourlyRate is not null %}
|
||||
{% set rate = entry.hourlyRate %}
|
||||
{% else %}
|
||||
{% set rate = app.user.getPreferenceValue('hourly_rate') %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>{{ entry.begin|date_short }}</td>
|
||||
<td>{{ entry.activity.name }} / {{ entry.project.name }}</td>
|
||||
<td contenteditable="true">{{ app.user.getPreferenceValue('hourly_rate')|money(model.calculator.currency) }}</td>
|
||||
<td>{{ entry.duration|duration }}</td>
|
||||
<td contenteditable="true">{{ rate|money(model.calculator.currency) }}</td>
|
||||
<td>{{ duration }}</td>
|
||||
<td>{{ entry.rate|money(model.calculator.currency) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -77,10 +77,20 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for entry in model.calculator.entries %}
|
||||
{% set duration = entry.duration|duration() %}
|
||||
{% if entry.fixedRate is not null %}
|
||||
{% set rate = entry.fixedRate %}
|
||||
{% set duration = 1 %}
|
||||
{% elseif entry.hourlyRate is not null %}
|
||||
{% set rate = entry.hourlyRate %}
|
||||
{% else %}
|
||||
{% set rate = app.user.getPreferenceValue('hourly_rate') %}
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<td contenteditable="true">{{ entry.description }}</td>
|
||||
<td contenteditable="true">{{ app.user.getPreferenceValue('hourly_rate')|money(model.calculator.currency) }}</td>
|
||||
<td contenteditable="true">{{ entry.duration|duration }}</td>
|
||||
<td contenteditable="true">{{ rate|money(model.calculator.currency) }}</td>
|
||||
<td contenteditable="true">{{ duration }}</td>
|
||||
<td>{{ entry.rate|money(model.calculator.currency) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue