Also copy move_on_open when copying a product (fixes #2478)

This commit is contained in:
Bernd Bestel 2024-02-23 17:08:34 +01:00
parent edf973df00
commit 4d8f08eddd
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,7 @@
- If the lookup was successful, the product edit page of the created product is displayed, where the product setup can be completed (if required) - If the lookup was successful, the product edit page of the created product is displayed, where the product setup can be completed (if required)
- After that, the transaction is continued with that product - After that, the transaction is continued with that product
- Fixed that for the product's last price stock transactions with an empty or `0` price weren't ignored - Fixed that for the product's last price stock transactions with an empty or `0` price weren't ignored
- Fixed that when copying a product, the field "Move on open" wasn't copied along
### Shopping list ### Shopping list

View File

@ -450,6 +450,10 @@ if (Grocy.EditMode == "create" && GetUriParam("copy-of") != undefined)
$("#auto_reprint_stock_label").prop("checked", true); $("#auto_reprint_stock_label").prop("checked", true);
} }
$("#default_stock_label_type").val(sourceProduct.default_stock_label_type); $("#default_stock_label_type").val(sourceProduct.default_stock_label_type);
if (BoolVal(sourceProduct.move_on_open))
{
$("#move_on_open").prop("checked", true);
}
Grocy.FrontendHelpers.ValidateForm('product-form'); Grocy.FrontendHelpers.ValidateForm('product-form');
}, },