2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-04 04:30:56 +00:00

Displays "purchase order" column in StockItem table

This commit is contained in:
Oliver
2021-06-21 16:58:39 +10:00
parent 32385f709b
commit e6598b5115
4 changed files with 31 additions and 2 deletions

View File

@ -660,6 +660,27 @@ function loadStockTable(table, options) {
title: '{% trans "Last Updated" %}',
sortable: true,
},
{
field: 'purchase_order',
title: '{% trans "Purchase Order" %}',
formatter: function(value, row) {
if (!value) {
return '-';
}
var link = `/order/purchase-order/${row.purchase_order}/`;
var text = `${row.purchase_order}`;
if (row.purchase_order_reference) {
var prefix = '{% settings_value "PURCHASEORDER_REFERENCE_PREFIX" %}';
text = prefix + row.purchase_order_reference;
}
return renderLink(text, link);
}
},
{
field: 'purchase_price',
title: '{% trans "Purchase Price" %}',