Show placeholder for null IPN values in "stock" table (#3737)

- Otherwise can display the text "null"
This commit is contained in:
Oliver 2022-10-01 16:08:32 +10:00 committed by GitHub
parent 1f2859d8c9
commit 52071f2c3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1729,7 +1729,11 @@ function loadStockTable(table, options) {
switchable: params['part_detail'],
formatter: function(value, row) {
var ipn = row.part_detail.IPN;
return withTitle(shortenString(ipn), ipn);
if (ipn) {
return withTitle(shortenString(ipn), ipn);
} else {
return '-';
}
},
};