mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Fixed stock entry label info handling when the corresponding feature flag is disabled
This commit is contained in:
parent
aec71bd408
commit
2633d3d1a5
@ -523,8 +523,10 @@ function UndoStockTransaction(transactionId)
|
||||
|
||||
$("#display_amount").attr("min", "0");
|
||||
|
||||
$("#stock_label_type, #amount").on("change", function(e)
|
||||
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||
{
|
||||
$("#stock_label_type, #amount").on("change", function(e)
|
||||
{
|
||||
if ($("#stock_label_type").val() == 2)
|
||||
{
|
||||
var estimatedBookingAmount = Number.parseFloat($("#amount").attr("data-estimated-booking-amount"));
|
||||
@ -541,4 +543,5 @@ $("#stock_label_type, #amount").on("change", function(e)
|
||||
{
|
||||
$("#stock-entry-label-info").text("");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -721,8 +721,10 @@ function ScanModeSubmit(singleUnit = true)
|
||||
}
|
||||
}
|
||||
|
||||
$("#stock_label_type, #amount").on("change", function(e)
|
||||
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||
{
|
||||
$("#stock_label_type, #amount").on("change", function(e)
|
||||
{
|
||||
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"));
|
||||
@ -731,4 +733,5 @@ $("#stock_label_type, #amount").on("change", function(e)
|
||||
{
|
||||
$("#stock-entry-label-info").text("");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user