mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Fixed more missing fields when copying a product (fixes #2231)
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
- Fixed that sorting by the "Value" and "Min. stock amount" columns on the stock overview page didn't work
|
- Fixed that sorting by the "Value" and "Min. stock amount" columns on the stock overview page didn't work
|
||||||
- Fixed that the consumed amount was wrong, when consuming multiple substituted subproducts at once and when multiple/different conversion factors were involved
|
- Fixed that the consumed amount was wrong, when consuming multiple substituted subproducts at once and when multiple/different conversion factors were involved
|
||||||
- Fixed that for a product's average price, only currently in-stock items were considered, not already consumed ones
|
- Fixed that for a product's average price, only currently in-stock items were considered, not already consumed ones
|
||||||
- Fixed that when copying a product, the field "Default consume location" was not copied along
|
- Fixed that when copying a product, some fields (like "Default consume location" or "Disable own stock) weren't copied along
|
||||||
|
|
||||||
### Shopping list
|
### Shopping list
|
||||||
|
|
||||||
|
@@ -431,6 +431,19 @@ if (Grocy.EditMode == "create" && GetUriParam("copy-of") != undefined)
|
|||||||
$("#quick_consume_amount").val(sourceProduct.quick_consume_amount);
|
$("#quick_consume_amount").val(sourceProduct.quick_consume_amount);
|
||||||
$("#quick_open_amount").val(sourceProduct.quick_open_amount);
|
$("#quick_open_amount").val(sourceProduct.quick_open_amount);
|
||||||
$("#default_consume_location_id").val(sourceProduct.default_consume_location_id);
|
$("#default_consume_location_id").val(sourceProduct.default_consume_location_id);
|
||||||
|
if (BoolVal(sourceProduct.no_own_stock))
|
||||||
|
{
|
||||||
|
$("#no_own_stock").prop("checked", true);
|
||||||
|
}
|
||||||
|
if (BoolVal(sourceProduct.hide_on_stock_overview))
|
||||||
|
{
|
||||||
|
$("#hide_on_stock_overview").prop("checked", true);
|
||||||
|
}
|
||||||
|
if (BoolVal(sourceProduct.auto_reprint_stock_label))
|
||||||
|
{
|
||||||
|
$("#auto_reprint_stock_label").prop("checked", true);
|
||||||
|
}
|
||||||
|
$("#default_stock_label_type").val(sourceProduct.default_stock_label_type);
|
||||||
|
|
||||||
Grocy.FrontendHelpers.ValidateForm('product-form');
|
Grocy.FrontendHelpers.ValidateForm('product-form');
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user