Release 1.6.1 (#1282)

This commit is contained in:
Kevin Papst
2019-11-26 17:22:31 +01:00
committed by GitHub
parent 724eb9c658
commit 5ee0396a02
27 changed files with 240 additions and 112 deletions

View File

@@ -5,7 +5,7 @@
{% set actions = {'visibility': '#modal_invoice'} %}
{% if is_granted('manage_invoice_template') %}
{% set actions = actions|merge({'list': path('admin_invoice_template')}) %}
{% set actions = actions|merge({'invoice-template': path('admin_invoice_template')}) %}
{% endif %}
{% set actions = actions|merge({'help': {'url': 'invoices.html'|docu_link, 'target': '_blank'}}) %}

View File

@@ -67,21 +67,19 @@
<tr>
<th>{{ 'label.date'|trans }}</th>
<th>{{ 'label.description'|trans }}</th>
<th>{{ 'label.unit_price'|trans }}</th>
<th class="text-center">{{ 'label.hours'|trans }}</th>
<th class="text-right">{{ 'label.unit_price'|trans }}</th>
<th class="text-right">{{ 'label.amount'|trans }}</th>
<th class="text-right">{{ 'label.total_rate'|trans }}</th>
</tr>
</thead>
<tbody>
{% for entry in model.calculator.entries %}
{% set duration = entry.duration|duration %}
{% set duration = entry.duration|duration_decimal %}
{% if entry.fixedRate %}
{% set rate = entry.fixedRate %}
{% set duration = entry.amount %}
{% elseif entry.hourlyRate is not null %}
{% set rate = entry.hourlyRate %}
{% set duration = entry.amount|amount %}
{% else %}
{% set rate = app.user.getPreferenceValue('hourly_rate') %}
{% set rate = entry.hourlyRate %}
{% endif %}
<tr>
<td nowrap class="text-nowrap">{{ entry.begin|date_short }}</td>
@@ -92,8 +90,8 @@
{{ entry.activity.name }} / {{ entry.project.name }}
{% endif %}
</td>
<td nowrap class="text-nowrap" contenteditable="true">{{ rate|money(model.calculator.currency) }}</td>
<td nowrap class="text-nowrap text-center">{{ duration }}</td>
<td nowrap class="text-nowrap text-right">{{ rate|money(model.calculator.currency) }}</td>
<td nowrap class="text-nowrap text-right">{{ duration }}</td>
<td nowrap class="text-nowrap text-right">{{ entry.rate|money(model.calculator.currency) }}</td>
</tr>
{% endfor %}
@@ -127,9 +125,9 @@
<div class="row">
<div class="col-xs-12">
{% if model.template.paymentTerms is not empty %}
<p contenteditable="true" class="paymentTerms">
<div contenteditable="true" class="paymentTerms">
{{ model.template.paymentTerms|nl2br|md2html }}
</p>
</div>
{% endif %}
</div>
</div>

View File

@@ -61,7 +61,7 @@
{% endif %}
</table>
</article>
<article>
<article class="invoice-items">
<h2>{{ model.template.title|default('timesheet'|trans({}, 'invoice-renderer')) }}</h2>
<p contenteditable="true">
{{ 'label.invoice_salutation'|trans|nl2br }}
@@ -70,9 +70,9 @@
<thead>
<tr>
<th>{{ 'label.description'|trans }}</th>
<th>{{ 'label.unit_price'|trans }}</th>
<th>{{ 'label.amount'|trans }}</th>
<th>{{ 'label.total_rate'|trans }}</th>
<th class="text-right">{{ 'label.unit_price'|trans }}</th>
<th class="text-right">{{ 'label.amount'|trans }}</th>
<th class="text-right">{{ 'label.total_rate'|trans }}</th>
</tr>
</thead>
<tbody>
@@ -80,11 +80,9 @@
{% set duration = entry.duration|duration %}
{% if entry.fixedRate is not null %}
{% set rate = entry.fixedRate %}
{% set duration = entry.amount %}
{% elseif entry.hourlyRate is not null %}
{% set rate = entry.hourlyRate %}
{% set duration = entry.amount|amount %}
{% else %}
{% set rate = app.user.getPreferenceValue('hourly_rate') %}
{% set rate = entry.hourlyRate %}
{% endif %}
<tr>
@@ -95,9 +93,9 @@
{{ entry.activity.name }} / {{ entry.project.name }}
{% endif %}
</td>
<td contenteditable="true">{{ rate|money(model.calculator.currency) }}</td>
<td contenteditable="true">{{ duration }}</td>
<td>{{ entry.rate|money(model.calculator.currency) }}</td>
<td class="text-right">{{ rate|money(model.calculator.currency) }}</td>
<td class="text-right">{{ duration }}</td>
<td class="text-right">{{ entry.rate|money(model.calculator.currency) }}</td>
</tr>
{% endfor %}
</tbody>
@@ -119,9 +117,9 @@
</article>
{% if model.template.paymentTerms is not empty %}
<article class="paymentTerms">
<p contenteditable="true">
<div contenteditable="true">
{{ model.template.paymentTerms|nl2br|md2html }}
</p>
</div>
{% if signature is not empty %}
<img src="{{ signature }}">
{% endif %}

View File

@@ -72,7 +72,11 @@
{% set dayRate = {} %}
{%- endif -%}
<tr{% if is_granted('edit', entry) %} class="modal-ajax-form open-edit{% if not entry.end %} recording{% endif %}" data-href="{{ path(editRoute, {'id': entry.id}) }}"{% endif %}>
<td class="text-nowrap">{{ tables.datatable_multiupdate_row(entry.id) }}</td>
<td class="text-nowrap">
{% if is_granted('edit', entry) or is_granted('delete', entry) %}
{{ tables.datatable_multiupdate_row(entry.id) }}
{% endif %}
</td>
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, 'date') }}">{{ entry.begin|date_short }}</td>
{% if showStartEndTime %}