fix(portal): used rounded total in transaction rows, if enabled

This commit is contained in:
David Arnold
2023-10-02 17:45:43 +02:00
parent 3c1f93215a
commit fa8483fe8c

View File

@@ -15,10 +15,14 @@
{{ doc.items_preview }} {{ doc.items_preview }}
</div> </div>
</div> </div>
{% if doc.get('grand_total') %} {% if doc.is_rounded_total_disabled() and doc.get('grand_total') %}
<div class="col-sm-3 text-right font-weight-bold item-total"> <div class="col-sm-3 text-right font-weight-bold item-total">
{{ doc.get_formatted("grand_total") }} {{ doc.get_formatted("grand_total") }}
</div> </div>
{% elif doc.get('rounded_total') %}
<div class="col-sm-3 text-right font-weight-bold item-total">
{{ doc.get_formatted("rounded_total") }}
</div>
{% endif %} {% endif %}
</div> </div>
<a class="transaction-item-link" href="/{{ pathname }}/{{ doc.name }}">Link</a> <a class="transaction-item-link" href="/{{ pathname }}/{{ doc.name }}">Link</a>