mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 18:12:44 +00:00
Fixed stock QU change restriction / include undone stock transactions (fixes #1473)
This commit is contained in:
parent
e646dd9332
commit
b7a6b91039
@ -141,10 +141,10 @@ $('.save-product-button').on('click', function(e)
|
|||||||
|
|
||||||
if (Grocy.EditMode == "edit")
|
if (Grocy.EditMode == "edit")
|
||||||
{
|
{
|
||||||
Grocy.Api.Get('stock/products/' + Grocy.EditObjectId,
|
Grocy.Api.Get('objects/stock_log?query[]=product_id=' + Grocy.EditObjectId,
|
||||||
function(productDetails)
|
function(productJournalEntries)
|
||||||
{
|
{
|
||||||
if (productDetails.last_purchased == null)
|
if (productJournalEntries.length == 0)
|
||||||
{
|
{
|
||||||
$('#qu_id_stock').removeAttr("disabled");
|
$('#qu_id_stock').removeAttr("disabled");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user