Added a new product option "Disable own stock" (closes #564)

This commit is contained in:
Bernd Bestel
2022-04-01 18:49:17 +02:00
parent b53d1a076f
commit ccc59dfc8b
10 changed files with 132 additions and 19 deletions

View File

@@ -122,11 +122,19 @@ if (!prefillProductId2.isEmpty())
if (typeof prefillProductId !== "undefined")
{
$('#product_id').val(prefillProductId);
$('#product_id').data('combobox').refresh();
$('#product_id').trigger('change');
var nextInputElement = $(Grocy.Components.ProductPicker.GetPicker().parent().data('next-input-selector').toString());
nextInputElement.focus();
if ($('#product_id').val() != null)
{
$('#product_id').data('combobox').refresh();
$('#product_id').trigger('change');
var nextInputElement = $(Grocy.Components.ProductPicker.GetPicker().parent().data('next-input-selector').toString());
nextInputElement.focus();
}
else
{
Grocy.Components.ProductPicker.GetInputElement().focus();
}
}
if (GetUriParam("flow") === "InplaceAddBarcodeToExistingProduct")