diff --git a/cookbook/templates/shopping_list.html b/cookbook/templates/shopping_list.html index 545a1611e..47ea598b1 100644 --- a/cookbook/templates/shopping_list.html +++ b/cookbook/templates/shopping_list.html @@ -137,7 +137,7 @@ - [[element.amount]] + [[element.amount.toFixed(2)]] [[element.unit.name]] [[element.food.name]] @@ -319,7 +319,7 @@ - [[x.amount]] + [[x.amount.toFixed(2)]] [[x.unit.name]] [[x.food.name]] ([[x.recipes.join(', ')]]) @@ -505,7 +505,7 @@ servings = this.servings_cache[item.list_recipe] } - entry.amount += (item.amount * servings).toFixed(2) + entry.amount += item.amount * servings if (item.list_recipe !== null && entry.recipes.indexOf(this.recipe_cache[item.list_recipe]) === -1) { entry.recipes.push(this.recipe_cache[item.list_recipe]) @@ -514,7 +514,7 @@ entry.entries.push(item.id) } else { if (item.list_recipe !== null) { - item.amount = (item.amount * this.servings_cache[item.list_recipe]).toFixed(2) + item.amount = item.amount * this.servings_cache[item.list_recipe] } item.unit = ((element.unit !== undefined && element.unit !== null) ? element.unit : {'name': ''}) item.entries = [element.id]