Make it possible to change a products stock QU after it was once added to stock (closes #1326)

This commit is contained in:
Bernd Bestel
2022-03-13 17:09:07 +01:00
parent 7532626123
commit 7ea9984fd3
6 changed files with 61 additions and 31 deletions

View File

@@ -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"));