mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 03:25:42 +00:00
Display stock item serial number (if it exists)!
This commit is contained in:
@ -469,7 +469,16 @@ function loadStockTable(table, options) {
|
|||||||
title: 'Stock',
|
title: 'Stock',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
var text = renderLink(value, row.url);
|
|
||||||
|
var val = value;
|
||||||
|
|
||||||
|
// If there is a single unit with a serial number, use the serial number
|
||||||
|
if (row.serial && row.quantity == 1) {
|
||||||
|
val = '# ' + row.serial;
|
||||||
|
}
|
||||||
|
|
||||||
|
var text = renderLink(val, row.url);
|
||||||
|
|
||||||
text = text + "<span class='badge'>" + row.status_text + "</span>";
|
text = text + "<span class='badge'>" + row.status_text + "</span>";
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user