mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 11:06:36 +00:00
Make it possible to customize the default amount for purchase/consume (closes #215)
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
$("#amount").attr("min", "1");
|
||||
$("#amount").attr("step", "1");
|
||||
$("#amount").parent().find(".invalid-feedback").text(__t('The amount cannot be lower than %s', '1'));
|
||||
$('#amount').val(0);
|
||||
$('#amount').val(Grocy.UserSettings.stock_default_purchase_amount);
|
||||
$('#price').val('');
|
||||
$('#amount_qu_unit').text("");
|
||||
$("#tare-weight-handling-info").addClass("d-none");
|
||||
@@ -177,7 +177,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
}
|
||||
});
|
||||
|
||||
$('#amount').val(0);
|
||||
$('#amount').val(Grocy.UserSettings.stock_default_purchase_amount);
|
||||
Grocy.FrontendHelpers.ValidateForm('purchase-form');
|
||||
|
||||
if (Grocy.Components.ProductPicker.InProductAddWorkflow() === false)
|
||||
|
Reference in New Issue
Block a user