mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
Initialize target date for new PO line and SO line (#4170)
* Initialize date for new PO line or SO line Set new PO/SO line initial date to that of the PO/SO it belongs to. * Changed date formatting to render_date template tag * Reverted the change to format the date with the render_date template tag
This commit is contained in:
@ -179,6 +179,9 @@ $('#new-po-line').click(function() {
|
||||
currency: '{{ order.supplier.currency }}',
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if order.target_date %}
|
||||
target_date: '{{ order.target_date|date:'Y-m-d' }}',
|
||||
{% endif %}
|
||||
onSuccess: function() {
|
||||
$('#po-line-table').bootstrapTable('refresh');
|
||||
}
|
||||
|
@ -252,6 +252,9 @@
|
||||
|
||||
var fields = soLineItemFields({
|
||||
order: {{ order.pk }},
|
||||
{% if order.target_date %}
|
||||
target_date: '{{ order.target_date|date:'Y-m-d' }}',
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
constructForm('{% url "api-so-line-list" %}', {
|
||||
|
Reference in New Issue
Block a user