Fixed /stockedit opened checkbox (references #506)

This commit is contained in:
Bernd Bestel
2020-01-21 20:04:33 +01:00
parent f543a3a472
commit c22496ca7c
5 changed files with 19 additions and 11 deletions

View File

@@ -23,6 +23,8 @@
}
jsonData.price = price;
jsonData.open = $("#open").is(":checked");
var stockRowId = GetUriParam('stockRowId');
jsonData.id = stockRowId;
@@ -88,6 +90,7 @@ Grocy.Api.Get("stock/" + stockRowId + "/entry",
Grocy.Components.LocationPicker.SetId(stockEntry.location_id);
$('#amount').val(stockEntry.amount);
$('#price').val(stockEntry.price);
$("#open").prop('checked', BoolVal(stockEntry.open));
Grocy.Components.DateTimePicker.SetValue(stockEntry.best_before_date);
Grocy.Api.Get('stock/products/' + stockEntry.product_id,