Skip to content
Snippets Groups Projects
Commit 8146fdc1 authored by TonyFord's avatar TonyFord
Browse files

bug fix import order into form

parent b45c10fe
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
<select id="{{ fields[0] }}" class="order-form form-control" onchange="createYml()"> <select id="{{ fields[0] }}" class="order-form form-control" onchange="createYml()">
{% for v in fvalues %} {% for v in fvalues %}
<optgroup label="{{ v[0] }}">{% assign ps=v[1] | map: 'price-sources' | clean %} <optgroup label="{{ v[0] }}">{% assign ps=v[1] | map: 'price-sources' | clean %}
<option value="{{ v[0] }}">{{ v[0] }}</option>
{% for w in ps %} {% for w in ps %}
{% for y in w[1] %} {% for y in w[1] %}
<option value="{{ v[0] }},{{ w[0] }},{{ y[0] }}" title="">{{ w[0] }},{{ y[0] }}</option> <option value="{{ v[0] }},{{ w[0] }},{{ y[0] }}" title="">{{ w[0] }},{{ y[0] }}</option>
......
...@@ -58,9 +58,9 @@ ...@@ -58,9 +58,9 @@
<div><small>{{ o.description }}</small></div> <div><small>{{ o.description }}</small></div>
</div> </div>
{% capture priceref %}{{ o.price-reference | split: ',' | join: '-' }}{% endcapture %} {% capture priceref %}{{ o.price-reference | split: ',' | join: '-' }}{% endcapture %}
{% capture price_ex %}{{ site.data.price-sources[priceref].price | plus: 0.00001 | round: 4 }}{% endcapture %} {% capture price_ex %}{% if site.data.price-sources[priceref] %}{{ site.data.price-sources[priceref].price | plus: 0.00001 | round: 4 }}{% else %}1{% endif %}{% endcapture %}
{% capture price %}{% if price_ex != "" %}{{price_ex}}{% else %}{{ o.price-source }}{% endif %}{% endcapture %} {% capture price %}{% if price_ex != "" %}{{price_ex}}{% else %}{{ o.price-source }}{% endif %}{% endcapture %}
<div class="orderlist-price"><font class="faircoin-price">{{ o.price-per-unit | divided_by: price | round:1 | decimals }} FAIR</font><br>{% if min-size > 0 %}{{ min-size }}..{% endif %}{{ max-size }} {{ o.unit }}<br>( {{ o.price-per-unit | decimals }} {{ site.data.price-sources[priceref].currency }} / {{ o.unit }} )<br>( {{ price }} {{ site.data.price-sources[priceref].currency }} / FAIR )<br><i>{% if price_ex != "" %}<a href="{{ site.data.price-sources[o.price-source].www }}">{{ o.price-source | replace: '-','/' }}</a>{% else %}fixed price{% endif %}</i> <div class="orderlist-price"><font class="faircoin-price">{{ o.price-per-unit | divided_by: price | round:1 | decimals }} FAIR</font><br>{% if min-size > 0 %}{{ min-size }}..{% endif %}{{ max-size }} {{ o.unit }}{% if site.data.price-sources[priceref] %}<br>( {{ o.price-per-unit | decimals }} {{ site.data.price-sources[priceref].currency }} / {{ o.unit }} )<br>( {{ price }} {{ site.data.price-sources[priceref].currency }} / FAIR )<br><i>{% if price_ex != "" %}<a href="{{ site.data.price-sources[o.price-source].www }}">{{ o.price-source | replace: '-','/' }}</a>{% else %}fixed price{% endif %}</i>{% endif %}
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment