mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 20:11:16 +00:00
Make it possible to provide the purchase price also as a total price (closes #390)
This commit is contained in:
@@ -14,6 +14,16 @@
|
||||
if (!jsonForm.price.toString().isEmpty())
|
||||
{
|
||||
price = parseFloat(jsonForm.price).toFixed(2);
|
||||
|
||||
if ($("input[name='price-type']:checked").val() == "total-price")
|
||||
{
|
||||
price = price / amount;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
{
|
||||
price = 0;
|
||||
}
|
||||
|
||||
var jsonData = {};
|
||||
|
Reference in New Issue
Block a user