diff --git a/changelog/62_UNRELEASED_xxxx-xx-xx.md b/changelog/62_UNRELEASED_xxxx-xx-xx.md
index 0a77fa90..116771ad 100644
--- a/changelog/62_UNRELEASED_xxxx-xx-xx.md
+++ b/changelog/62_UNRELEASED_xxxx-xx-xx.md
@@ -3,6 +3,7 @@
- Fixed that editing stock entries was not possible
- Fixed that consuming with Scan Mode was not possible
- Fixed that the current stock total value (header of the stock overview page) didn't include decimal amounts (thanks @Ape)
+- Fixed that the transfer page was not fully populated when opening it from the stock entries page
### Shopping list fixes
- Fixed that shopping list prints had a grey background (thanks @Forceu)
diff --git a/public/viewjs/transfer.js b/public/viewjs/transfer.js
index b679c7c6..2651ce37 100644
--- a/public/viewjs/transfer.js
+++ b/public/viewjs/transfer.js
@@ -126,12 +126,15 @@
Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
{
$("#specific_stock_entry").find("option").remove().end().append("");
- if ($("#use_specific_stock_entry").is(":checked"))
+ if ($("#use_specific_stock_entry").is(":checked") && GetUriParam("stockId") == null)
{
$("#use_specific_stock_entry").click();
}
$("#location_id_to").val("");
- $("#location_id_from").val("");
+ if (GetUriParam("stockId") == null)
+ {
+ $("#location_id_from").val("");
+ }
var productId = $(e.target).val();
@@ -185,6 +188,12 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
$("#location_id_from").trigger('change');
}
});
+
+ if (GetUriParam("locationId") != null)
+ {
+ $("#location_id_from").val(GetUriParam("locationId"));
+ $("#location_id_from").trigger("change");
+ }
},
function(xhr)
{
@@ -284,7 +293,7 @@ $("#location_id_from").on('change', function(e)
}
$("#specific_stock_entry").find("option").remove().end().append("");
- if ($("#use_specific_stock_entry").is(":checked"))
+ if ($("#use_specific_stock_entry").is(":checked") && GetUriParam("stockId") == null)
{
$("#use_specific_stock_entry").click();
}
@@ -475,6 +484,7 @@ if (GetUriParam("embedded") !== undefined)
$("#location_id_from").trigger('change');
$("#use_specific_stock_entry").click();
$("#use_specific_stock_entry").trigger('change');
+ Grocy.Components.ProductPicker.GetPicker().trigger('change');
}
}