mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +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',
|
||||
sortable: true,
|
||||
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>";
|
||||
return text;
|
||||
}
|
||||
|
Reference in New Issue
Block a user