Also copy treat_opened_as_out_of_stock when copying a product (#2501)

This commit is contained in:
TheDodger
2024-03-17 21:24:35 +01:00
committed by GitHub
parent 5167ba1154
commit 8f9b295e68
2 changed files with 5 additions and 0 deletions

View File

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