mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 07:51:35 +01:00
fix: prevent rounding errors
This commit is contained in:
@@ -91,13 +91,8 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in model.calculator.entries %}
|
||||
{% set duration = entry.duration|duration(isDecimal) %}
|
||||
{% if entry.fixedRate %}
|
||||
{% set rate = entry.fixedRate %}
|
||||
{% set duration = entry.amount/8.5|amount %}
|
||||
{% else %}
|
||||
{% set days = entry.duration // (60*60*8.5)%}
|
||||
{% set rate = entry.hourlyRate*8.5 %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<!---
|
||||
<td nowrap class="text-nowrap">{{ entry.begin|date_short }}</td>
|
||||
@@ -111,7 +106,7 @@
|
||||
</td>
|
||||
<td nowrap class="text-nowrap text-right"></td>
|
||||
<td nowrap class="text-nowrap text-right">{{ rate|money(currency) }}</td>
|
||||
<td nowrap class="text-nowrap text-right">{{ duration/8.5 }}</td>
|
||||
<td nowrap class="text-nowrap text-right">{{ days }}</td>
|
||||
<td nowrap class="text-nowrap text-right">{{ entry.rate|money(currency) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user