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

fix for part with no bom-price #1678

This commit is contained in:
2021-06-17 18:21:11 +02:00
parent bc46cca9f0
commit 997d68694e
2 changed files with 26 additions and 17 deletions

View File

@@ -198,18 +198,18 @@ The part single price is the current purchase price for that supplier part."></i
var bomdata = {
labels: [{% for line in bom_parts %}'{{ line.name }}',{% endfor %}],
datasets: [
{% if bom_pie_min %}
{
label: 'Price',
data: [{% for line in bom_parts %}{{ line.min_price }},{% endfor %}],
backgroundColor: bom_colors,
},
{% if bom_pie_max %}
{
label: 'Max Price',
data: [{% for line in bom_parts %}{{ line.max_price }},{% endfor %}],
backgroundColor: bom_colors,
},
{% endif %}
{
label: 'Price',
data: [{% for line in bom_parts %}{% if bom_pie_min %}{{ line.min_price }}{% else %}{{ line.price }}{% endif%},{% endfor %}],
backgroundColor: bom_colors,
}
]
};
var BomChart = loadBomChart(document.getElementById('BomChart'), bomdata)