mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Make it possible to change a products stock QU after it was once added to stock (closes #1326)
This commit is contained in:
@@ -140,23 +140,6 @@ $('.save-product-button').on('click', function(e)
|
||||
);
|
||||
});
|
||||
|
||||
if (Grocy.EditMode == "edit")
|
||||
{
|
||||
Grocy.Api.Get('objects/stock_log?limit=1&query[]=product_id=' + Grocy.EditObjectId,
|
||||
function(productJournalEntries)
|
||||
{
|
||||
if (productJournalEntries.length == 0)
|
||||
{
|
||||
$('#qu_id_stock').removeAttr("disabled");
|
||||
}
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (GetUriParam("flow") == "InplaceNewProductWithName")
|
||||
{
|
||||
$('#name').val(GetUriParam("name"));
|
||||
|
Reference in New Issue
Block a user