mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Shipment delivery date (#4825)
* Add delivery date setting to Shipment model * Add delivery_date to serializer * Correct test for is_delivered * Add relevant fields to API and forms * Add test * Increment API version * Move migration file because of conflict
This commit is contained in:
@ -209,6 +209,9 @@ function salesOrderShipmentFields(options={}) {
|
||||
},
|
||||
link: {
|
||||
icon: 'fa-link',
|
||||
},
|
||||
delivery_date: {
|
||||
icon: 'fa-calendar-check',
|
||||
}
|
||||
};
|
||||
|
||||
@ -298,7 +301,11 @@ function completeSalesOrderShipment(shipment_id, options={}) {
|
||||
link: {
|
||||
value: shipment.link,
|
||||
icon: 'fa-link',
|
||||
}
|
||||
},
|
||||
delivery_date: {
|
||||
value: shipment.delivery_date,
|
||||
icon: 'fa-calendar-check',
|
||||
},
|
||||
},
|
||||
preFormContent: html,
|
||||
confirm: true,
|
||||
@ -979,6 +986,18 @@ function loadSalesOrderShipmentTable(table, options={}) {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'delivery_date',
|
||||
title: '{% trans "Delivery Date" %}',
|
||||
sortable: true,
|
||||
formatter: function(value, row) {
|
||||
if (value) {
|
||||
return renderDate(value);
|
||||
} else {
|
||||
return '<em>{% trans "Unknown" %}</em>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'tracking_number',
|
||||
title: '{% trans "Tracking" %}',
|
||||
|
Reference in New Issue
Block a user