mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +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")
|
||||
{
|
||||
Grocy.Api.Get('stock/products/' + Grocy.EditObjectId,
|
||||
function(productDetails)
|
||||
Grocy.Api.Get('objects/stock_log?query[]=product_id=' + Grocy.EditObjectId,
|
||||
function(productJournalEntries)
|
||||
{
|
||||
if (productDetails.last_purchased == null)
|
||||
if (productJournalEntries.length == 0)
|
||||
{
|
||||
$('#qu_id_stock').removeAttr("disabled");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user