2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-03 13:58:47 +00:00

Fix for BOM display

- Perhaps need to make this cleaner, later on
- Is this too much data pushed through the API?
This commit is contained in:
Oliver Walters 2019-04-26 22:41:29 +10:00
parent accec07fe9
commit 73282801c9

View File

@ -87,7 +87,7 @@ function loadBomTable(table, options) {
// Part column // Part column
cols.push( cols.push(
{ {
field: 'sub_part', field: 'sub_part_detail',
title: 'Part', title: 'Part',
sortable: true, sortable: true,
formatter: function(value, row, index, field) { formatter: function(value, row, index, field) {
@ -99,7 +99,7 @@ function loadBomTable(table, options) {
// Part description // Part description
cols.push( cols.push(
{ {
field: 'sub_part.description', field: 'sub_part_detail.description',
title: 'Description', title: 'Description',
} }
); );
@ -137,14 +137,14 @@ function loadBomTable(table, options) {
else { else {
cols.push( cols.push(
{ {
field: 'sub_part.available_stock', field: 'sub_part_detail.available_stock',
title: 'Available', title: 'Available',
searchable: false, searchable: false,
sortable: true, sortable: true,
formatter: function(value, row, index, field) { formatter: function(value, row, index, field) {
var text = ""; var text = "";
if (row.quantity < row.sub_part.available_stock) if (row.quantity < row.sub_part_detail.available_stock)
{ {
text = "<span class='label label-success'>" + value + "</span>"; text = "<span class='label label-success'>" + value + "</span>";
} }