mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Only allow pricing update when creating a new PurchaseOrderLineItem (#4537)
Fixes https://github.com/inventree/InvenTree/issues/4485
This commit is contained in:
parent
e8e2985454
commit
66b8fb6bc1
@ -252,6 +252,7 @@ function poLineItemFields(options={}) {
|
|||||||
}
|
}
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
// Update pricing data (if available)
|
// Update pricing data (if available)
|
||||||
|
if (options.update_pricing) {
|
||||||
inventreeGet(
|
inventreeGet(
|
||||||
'{% url "api-part-supplier-price-list" %}',
|
'{% url "api-part-supplier-price-list" %}',
|
||||||
{
|
{
|
||||||
@ -280,6 +281,7 @@ function poLineItemFields(options={}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
@ -356,6 +358,7 @@ function createPurchaseOrderLineItem(order, options={}) {
|
|||||||
supplier: options.supplier,
|
supplier: options.supplier,
|
||||||
currency: options.currency,
|
currency: options.currency,
|
||||||
target_date: options.target_date,
|
target_date: options.target_date,
|
||||||
|
update_pricing: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
constructForm('{% url "api-po-line-list" %}', {
|
constructForm('{% url "api-po-line-list" %}', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user