Show the price in base currency if exchange rates are available.

This commit is contained in:
Jan Böhmer 2019-09-01 14:37:53 +02:00
parent 7e713b3e1a
commit a479dc81c4
5 changed files with 116 additions and 13 deletions

View file

@ -41,10 +41,15 @@
</td>
<td>
{{ detail.price | moneyFormat(detail.currency) }} / {{ detail.PriceRelatedQuantity | amountFormat(part.partUnit) }}
{# {{ detail.Price | moneyFormat }} <i>{% trans %}part.order.price_per{% endtrans %}</i> {{ detail.PriceRelatedQuantity }} #}
{% if detail.currency and pricedetail_helper.convertMoneyToCurrency(detail.price, detail.currency) > 0 %}
<span class="text-muted">({{ pricedetail_helper.convertMoneyToCurrency(detail.price, detail.currency) | moneyFormat() }})</span>
{% endif %}
</td>
<td>
{{ detail.PricePerUnit | moneyFormat(detail.currency) }}
{% if detail.currency and pricedetail_helper.convertMoneyToCurrency(detail.PricePerUnit, detail.currency) > 0 %}
<span class="text-muted">({{ pricedetail_helper.convertMoneyToCurrency(detail.PricePerUnit, detail.currency) | moneyFormat() }})</span>
{% endif %}
</td>
</tr>
{% endfor %}