Added a new product option default_purchase_price_type (closes #566)

This commit is contained in:
Bernd Bestel
2025-01-19 16:35:45 +01:00
parent f3effc5a60
commit e3965ed82c
5 changed files with 76 additions and 0 deletions

View File

@@ -343,6 +343,15 @@ if (Grocy.Components.ProductPicker !== undefined)
$("#stock_label_type").trigger("change");
}
if (productDetails.product.default_purchase_price_type == 2)
{
$("#price-type-unit-price").click();
}
else if (productDetails.product.default_purchase_price_type == 3)
{
$("#price-type-total-price").click();
}
setTimeout(function()
{
$('#display_amount').focus();