2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Display part pricing in Part view

- Calculate min_price and max_price based on provided supplier information
This commit is contained in:
Oliver Walters
2019-05-18 20:09:41 +10:00
parent 0cfb243eb3
commit a3d1591929
3 changed files with 77 additions and 1 deletions

View File

@@ -82,6 +82,25 @@
<td>{{ part.allocation_count }}</td>
</tr>
{% endif %}
{% if part.supplier_count > 0 %}
<tr>
<td>
Price
</td>
<td>
{% if part.min_single_price %}
{% if part.min_single_price == part.max_single_price %}
{{ part.min_single_price }}
{% else %}
{{ part.min_single_price }} to {{ part.max_single_price }}
{% endif %}
from {{ part.supplier_count }} suppliers.
{% else %}
<span class='warning-msg'><i>No pricing data avilable</i></span>
{% endif %}
</td>
</tr>
{% endif %}
</table>
</div>
</div>