2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Adds "overdue" field to sales order line item

- API serializer
- front end / UX tables
This commit is contained in:
Oliver
2022-02-28 15:24:01 +11:00
parent b451f3d149
commit 4858787a78
3 changed files with 46 additions and 5 deletions

View File

@ -2235,6 +2235,28 @@ function loadSalesOrderLineItemTable(table, options={}) {
return formatter.format(total);
}
},
{
field: 'target_date',
title: '{% trans "Target Date" %}',
sortable: true,
switchable: 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 '-';
}
}
}
];
if (pending) {
@ -2378,6 +2400,7 @@ function loadSalesOrderLineItemTable(table, options={}) {
reference: {},
sale_price: {},
sale_price_currency: {},
target_date: {},
notes: {},
},
title: '{% trans "Edit Line Item" %}',