Fixed stock entry label info handling when the corresponding feature flag is disabled

This commit is contained in:
Bernd Bestel 2023-05-22 22:33:36 +02:00
parent aec71bd408
commit 2633d3d1a5
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 26 additions and 20 deletions

View File

@ -523,6 +523,8 @@ function UndoStockTransaction(transactionId)
$("#display_amount").attr("min", "0"); $("#display_amount").attr("min", "0");
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
{
$("#stock_label_type, #amount").on("change", function(e) $("#stock_label_type, #amount").on("change", function(e)
{ {
if ($("#stock_label_type").val() == 2) if ($("#stock_label_type").val() == 2)
@ -542,3 +544,4 @@ $("#stock_label_type, #amount").on("change", function(e)
$("#stock-entry-label-info").text(""); $("#stock-entry-label-info").text("");
} }
}); });
}

View File

@ -721,6 +721,8 @@ function ScanModeSubmit(singleUnit = true)
} }
} }
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
{
$("#stock_label_type, #amount").on("change", function(e) $("#stock_label_type, #amount").on("change", function(e)
{ {
if ($("#stock_label_type").val() == 2) if ($("#stock_label_type").val() == 2)
@ -732,3 +734,4 @@ $("#stock_label_type, #amount").on("change", function(e)
$("#stock-entry-label-info").text(""); $("#stock-entry-label-info").text("");
} }
}); });
}