Sortierung über eigenens InvoiceCalculator-Modul umgesetzt

Layout mit Zwischensummen angepasst
This commit is contained in:
2023-08-09 17:41:48 +02:00
parent b2e3c8836b
commit 6cf586ddfa

View File

@@ -246,7 +246,9 @@
margin-bottom: 10pt; margin-bottom: 10pt;
} }
.items th { .items caption {
font-size: 10pt;
font-weight: bold;
color: {{ weiss }}; color: {{ weiss }};
background-color: {{ hintergrund }} background-color: {{ hintergrund }}
} }
@@ -492,10 +494,11 @@ mpdf-->
<div class="items"> <div class="items">
<table cellpadding="0" cellspacing="0" width="100%" border="0"> <table cellpadding="0" cellspacing="0" width="100%" border="0">
<caption>Leistungsstunden</caption>
<thead> <thead>
<tr> <tr>
<th class="t-center"></th> <th class="t-center"></th>
<th class="t-left">Leistungsstunden</th> <th class="t-left"></th>
<th class="t-right text-nowrap"></th> <th class="t-right text-nowrap"></th>
<th class="t-center text-nowrap"></th> <th class="t-center text-nowrap"></th>
<th class="t-right text-nowrap"></th> <th class="t-right text-nowrap"></th>
@@ -520,6 +523,7 @@ mpdf-->
{% set totalAmount = 0 %} {% set totalAmount = 0 %}
{% set currentTag = '' %} {% set currentTag = '' %}
{% set j = 0 %}
<tr> <tr>
<td class="project-name"></td> <td class="project-name"></td>
@@ -531,15 +535,11 @@ mpdf-->
<!-- group by keywords: assuming, there is not more keywords found then groupByMaxKeywords (defined on top of the file) --> <!-- group by keywords: assuming, there is not more keywords found then groupByMaxKeywords (defined on top of the file) -->
{% for entry in entries %} {% for entry in entries %}
<!-- only timesheets, rest will be 'Auslagen' later --> <!-- only timesheets, rest will be 'Auslagen' later -->
{% if entry['entry.type'] == 'timesheet' %} {% if entry['entry.type'] == 'timesheet' %}
{% if entry['entry.project_id'] == invoice[id ~ '.id'] %} {% if entry['entry.project_id'] == invoice[id ~ '.id'] %}
{% set totalAmount = totalAmount + entry['entry.total_plain'] %} {% set j = j + 1 %}
{% set totalDuration = totalDuration + entry['entry.duration'] %}
{% set pos = pos + 1 %}
{% if entry['entry.tags'] != currentTag %} {% if entry['entry.tags'] != currentTag %}
@@ -549,6 +549,22 @@ mpdf-->
{% set currentTag = 'keine T&auml;tigkeit angegeben' %} {% set currentTag = 'keine T&auml;tigkeit angegeben' %}
{% endif %} {% endif %}
{% if j > 1 %}
<tr>
<td></td>
<td class="project-total t-left">Zwischensumme:</td>
<td class="project-total t-nowrap t-center"></td>
<td class="project-total t-nowrap t-right">{{ totalDuration|duration }}</td>
<td class="project-total t-nowrap t-right">{{ totalAmount|money(invoice['invoice.currency']) }}</td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
{% set totalDuration = 0 %}
{% set totalAmount = 0 %}
{% endif %}
<tr> <tr>
<td class="tag-name"></td> <td class="tag-name"></td>
<td class="tag-name">{{ currentTag }}</td> <td class="tag-name">{{ currentTag }}</td>
@@ -566,6 +582,10 @@ mpdf-->
</tr> </tr>
{% endif %} {% endif %}
{% set totalAmount = totalAmount + entry['entry.total_plain'] %}
{% set totalDuration = totalDuration + entry['entry.duration'] %}
{% set pos = pos + 1 %}
<tr> <tr>
<td class="t-nowrap t-center">{{ entry['entry.begin'] }}</td> <td class="t-nowrap t-center">{{ entry['entry.begin'] }}</td>
@@ -593,12 +613,12 @@ mpdf-->
<tr> <tr>
<td></td> <td></td>
<td class="project-total t-left">Zwischensumme:</td> <td class="project-total t-left">Zwischensumme:</td>
<td class="project-total t-nowrap t-center">{{ totalDuration|duration }}</td> <td class="project-total t-nowrap t-center"></td>
<td></td> <td class="project-total t-nowrap t-right">{{ totalDuration|duration }}</td>
<td class="project-total t-nowrap t-right">{{ totalAmount|money(invoice['invoice.currency']) }}</td> <td class="project-total t-nowrap t-right">{{ totalAmount|money(invoice['invoice.currency']) }}</td>
</tr> </tr>
<tr> <tr>
<td></td> <td colspan="5">&nbsp;</td>
</tr> </tr>
{% endif %} {% endif %}