mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Fixed stock entry label info handling when the corresponding feature flag is disabled
This commit is contained in:
@@ -721,14 +721,17 @@ function ScanModeSubmit(singleUnit = true)
|
||||
}
|
||||
}
|
||||
|
||||
$("#stock_label_type, #amount").on("change", function(e)
|
||||
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||
{
|
||||
if ($("#stock_label_type").val() == 2)
|
||||
$("#stock_label_type, #amount").on("change", function(e)
|
||||
{
|
||||
$("#stock-entry-label-info").text(__n(Number.parseFloat($("#amount").val()), "This means 1 label will be printed", "This means %1$s labels will be printed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#stock-entry-label-info").text("");
|
||||
}
|
||||
});
|
||||
if ($("#stock_label_type").val() == 2)
|
||||
{
|
||||
$("#stock-entry-label-info").text(__n(Number.parseFloat($("#amount").val()), "This means 1 label will be printed", "This means %1$s labels will be printed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#stock-entry-label-info").text("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user