2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +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:
bloemp
2023-01-09 23:07:54 +01:00
committed by GitHub
parent 385ed8277d
commit 49630e295d
3 changed files with 15 additions and 0 deletions

View File

@ -720,6 +720,7 @@ function createPurchaseOrderLineItem(order, options={}) {
order: order,
supplier: options.supplier,
currency: options.currency,
target_date: options.target_date,
});
constructForm('{% url "api-po-line-list" %}', {
@ -753,6 +754,10 @@ function soLineItemFields(options={}) {
fields.order.value = options.order;
}
if (options.target_date) {
fields.target_date.value = options.target_date;
}
return fields;
}
@ -905,6 +910,10 @@ function poLineItemFields(options={}) {
fields.purchase_price_currency.value = options.currency;
}
if (options.target_date) {
fields.target_date.value = options.target_date;
}
return fields;
}