mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Update purchase order table from part context
This commit is contained in:
parent
9e82b28e9d
commit
784189be75
@ -905,6 +905,28 @@ function loadPartPurchaseOrderTable(table, part_id, options={}) {
|
|||||||
field: 'quantity',
|
field: 'quantity',
|
||||||
title: '{% trans "Quantity" %}',
|
title: '{% trans "Quantity" %}',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'target_date',
|
||||||
|
title: '{% trans "Target Date" %}',
|
||||||
|
switchable: true,
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row) {
|
||||||
|
if (row.target_date) {
|
||||||
|
var html = row.target_date;
|
||||||
|
|
||||||
|
if (row.overdue) {
|
||||||
|
html += `<span class='fas fa-calendar-alt icon-red float-right' title='{% trans "This line item is overdue" %}'></span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return html;
|
||||||
|
|
||||||
|
} else if (row.order_detail && row.order_detail.target_date) {
|
||||||
|
return `<em>${row.order_detail.target_date}</em>`;
|
||||||
|
} else {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'received',
|
field: 'received',
|
||||||
title: '{% trans "Received" %}',
|
title: '{% trans "Received" %}',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user