grocy / grocy

ERP beyond your fridge - Grocy is a web-based self-hosted groceries & household management solution for your home
https://grocy.info
MIT License
6.67k stars 556 forks source link

Feature Request: Use different units for food energy #2109

Closed maxfire2008 closed 1 year ago

maxfire2008 commented 1 year ago

Instead of kilo calories I'd like to use kilo joules as that is the standard in Australia. A config option would be fine

berrnd commented 1 year ago

More or less the same as #1187 - you already can enter kilo joules there, it's just a numeric field with no special kcal handling at all.

The more config options, the more confusion in general - but let's add another one for this, since it seems important.

andreas-wolf commented 1 year ago

I have the problem too. Some products have only KJ on the label, others only kCal. Would be nice to be able to enter the data either way and then it gets converted to the missing unit. So both units are shown.

raupie commented 1 year ago

I'm curious about macros for food. Carbs, Fat, Protein. I'm using MyFitnessPal to track my diet and if I could store my recipes overall macro breakdown with servings breakdown I could replace that app entirely.

It would be an improvement request for recipes and I suppose inventory stock to assign these 3 macro units.

maxfire2008 commented 1 year ago

It could simply say "energy" but that could cause more confusion.

Blubberland commented 1 year ago

Also it would be nice if there was an option (maybe in the settings) for kcal/100. In germany (i think for the whole EU) it's mandatory for food suppliers to write it on the packing like that. Usually kcal/100g or kcal/100ml.

berrnd commented 1 year ago

Also it would be nice if there was an option (maybe in the settings) for kcal/100.

Off-topic here (this here is about not naming that option "kcal" / making the label configurable) - and: The product option "Energy (kcal)" relates to the product's quantity unit stock.

So this could only work if the product's QU stock is Gram or Milliliter or, when enforcing a unit for that field, if it has a direct or indirect relation to it.

It's a one-time action to fill that field properly when initially setting up the product, just like each and every other product option, so I don't really get what practically the big problem is.

 

In germany (i think for the whole EU) it's mandatory for food suppliers to write it on the packing like that.

grocy is not Germany or EU - read around here or on the r/grocy subreddit or many more places how different not only that is handled around the world. That's why grocy not enforces anything, and this won't change.

berrnd commented 1 year ago

Changelog excerpt for this:

_Added a new config.php setting ENERGY_UNIT to customize the label to display energy values (was fixed kcal before and defaults to that, so no changed behavior when not configured)_