render price in oer-modal if enabled in settings

This commit is contained in:
Matthias 2021-06-17 23:44:22 +02:00
parent a3a623a5ca
commit f0dd543ffa

View File

@ -4,6 +4,7 @@
{% load i18n %}
{% block form %}
{% default_currency as currency %}
{% settings_value 'PART_SHOW_PRICE_IN_FORMS' as show_price %}
<h4>
@ -50,7 +51,13 @@
<select class='select' id='id_supplier_part_{{ part.id }}' name="part-supplier-{{ part.id }}">
<option value=''>---------</option>
{% for supplier in part.supplier_parts.all %}
<option value="{{ supplier.id }}"{% if part.order_supplier == supplier.id %} selected="selected"{% endif %}>{{ supplier }}</option>
<option value="{{ supplier.id }}"{% if part.order_supplier == supplier.id %} selected="selected"{% endif %}>
{% if show_price %}
{% call_method supplier 'get_price' part.order_quantity as price %}
{% include "price.html" with price=price %} -
{% endif %}
{{ supplier }}
</option>
{% endfor %}
</select>
</div>