added internal rates (#1591)

This commit is contained in:
Kevin Papst
2020-04-08 14:50:15 +02:00
committed by GitHub
parent 82c713031e
commit 68d703d1e3
128 changed files with 4044 additions and 1571 deletions

View File

@@ -45,6 +45,9 @@ class InvoiceItemDefaultHydratorTest extends TestCase
'entry.rate',
'entry.rate_nc',
'entry.rate_plain',
'entry.rate_internal',
'entry.rate_internal_nc',
'entry.rate_internal_plain',
'entry.total',
'entry.total_nc',
'entry.total_plain',

View File

@@ -26,6 +26,7 @@ class InvoiceItemTest extends TestCase
self::assertNull($sut->getFixedRate());
self::assertNull($sut->getEnd());
self::assertEquals(0.00, $sut->getRate());
self::assertEquals(0.00, $sut->getInternalRate());
self::assertNull($sut->getProject());
self::assertIsArray($sut->getAdditionalFields());
self::assertEmpty($sut->getAdditionalFields());

View File

@@ -199,6 +199,9 @@ class DebugRendererTest extends TestCase
'entry.rate',
'entry.rate_nc',
'entry.rate_plain',
'entry.rate_internal',
'entry.rate_internal_nc',
'entry.rate_internal_plain',
'entry.total',
'entry.total_nc',
'entry.total_plain',

View File

@@ -1,6 +1,7 @@
{% extends 'invoice/layout.html.twig' %}
{% set language = model.template.language|default(app.request.locale) %}
{% set isDecimal = model.template.decimalDuration|default(false) %}
{% set currency = model.currency %}
{% block invoice %}
<div class="row">
@@ -91,9 +92,9 @@
{% if entry.activity is not null %}{{ entry.activity.name }} / {% endif %}{{ entry.project.name }}
{% endif %}
</td>
<td nowrap class="text-nowrap text-right">{{ rate|money(model.calculator.currency) }}</td>
<td nowrap class="text-nowrap text-right">{{ rate|money(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>
<td nowrap class="text-nowrap text-right">{{ entry.rate|money(currency) }}</td>
</tr>
{% endfor %}
</tbody>
@@ -102,20 +103,20 @@
<td colspan="4" class="text-right">
{{ 'invoice.subtotal'|trans({}, 'messages', language) }}
</td>
<td class="text-right">{{ model.calculator.subtotal|money(model.calculator.currency) }}</td>
<td class="text-right">{{ model.calculator.subtotal|money(currency) }}</td>
</tr>
<tr>
<td colspan="4" class="text-right">
{{ 'invoice.tax'|trans({}, 'messages', language) }} ({{ model.calculator.vat }}%)
</td>
<td class="text-right">{{ model.calculator.tax|money(model.calculator.currency) }}</td>
<td class="text-right">{{ model.calculator.tax|money(currency) }}</td>
</tr>
<tr>
<td colspan="4" class="text-right text-nowrap">
<strong>{{ 'invoice.total'|trans({}, 'messages', language) }}</strong>
</td>
<td class="text-right">
<strong>{{ model.calculator.total|money(model.calculator.currency) }}</strong>
<strong>{{ model.calculator.total|money(currency) }}</strong>
</td>
</tr>
</tfoot>