Jump to content

Products quantities: Difference between revisions

Added a section
No edit summary
(Added a section)
Line 25: Line 25:
** we can check that the conversion is well done if we have both values
** we can check that the conversion is well done if we have both values
** we can display the value in several metrics if we have a sanitized value in one metric
** we can display the value in several metrics if we have a sanitized value in one metric
=== Generic approach ===
The real-world quantities for products as used by the users us a far from ideal. However it is possible to find some common approach. (At least we try here)
* to indicate times, either a "*" or a "x" has been used;
* the generic formula is: multiplier * quantity * size_unit units
** multiplier indicates how often a quantity unit is used, i.e. 6 (25 cl bottles). This is a number.
** quantity the size of the units in size_units, i.e. 25 (size) cl (size_unit) bottles (units). This is a number.
** size_units is the unit for the size parameter, i.e. kg, ml or cl. This is an enumerated?
** unit is the element the numbers and sizes refer to, i.e. pot, bottle, sack, etc.
Examples:


== Countries ==
== Countries ==
3,543

edits