UnitOfMeasure enum represents all units of measure supported by the FacturaE 3.2.2 XSD specification. Each unit has a unique code used in the XML output.
Enum Cases
The following table lists all 36 units of measure available:| Case | Code | Description | Common Use |
|---|---|---|---|
Units | 01 | Units | General items, pieces |
Hours | 02 | Hours | Services, labor |
Kilograms | 03 | Kilograms | Weight measurements |
Liters | 04 | Liters | Liquids, volume |
Other | 05 | Other units | Custom/unspecified |
Boxes | 06 | Boxes | Packaging |
Trays | 07 | Trays | Food service |
Barrels | 08 | Barrels | Bulk liquids |
Jerricans | 09 | Jerricans | Containers |
Bags | 10 | Bags | Bulk goods |
Carboys | 11 | Carboys | Large bottles |
Bottles | 12 | Bottles | Beverages |
Canisters | 13 | Canisters | Containers |
Tetrabriks | 14 | Tetrabriks | Beverage packaging |
Centiliters | 15 | Centiliters | Small volumes |
Centimeters | 16 | Centimeters | Length |
Bins | 17 | Bins | Storage |
Dozens | 18 | Dozens | Groups of 12 |
Cases | 19 | Cases | Bulk packaging |
Demijohns | 20 | Demijohns | Large bottles |
Grams | 21 | Grams | Small weights |
Kilometers | 22 | Kilometers | Distance |
Cans | 23 | Cans | Food/beverage |
Bunches | 24 | Bunches | Produce |
Meters | 25 | Meters | Length, fabric |
Millimeters | 26 | Millimeters | Precision length |
SixPacks | 27 | Six-packs | Beverage packaging |
Packages | 28 | Packages | General packaging |
Portions | 29 | Portions | Food service |
Rolls | 30 | Rolls | Paper, fabric |
Envelopes | 31 | Envelopes | Mailing |
Tubs | 32 | Tubs | Containers |
CubicMeters | 33 | Cubic meters | Volume |
Seconds | 34 | Seconds | Time |
Watts | 35 | Watts | Power |
KWh | 36 | Kilowatt-hours | Energy |
Usage Examples
Services Billed by Hours
Products by Units
Goods Sold by Weight
Liquids by Volume
Energy Consumption
Fabric or Materials by Meters
Bulk Packaging
Most Common Units
The most frequently used units of measure are:- Units (
01) - Default for countable items - Hours (
02) - Professional services, labor - Kilograms (
03) - Products sold by weight - Liters (
04) - Liquids and beverages - Meters (
25) - Construction materials, fabric - KWh (
36) - Utilities and energy
Notes
- If no unit is specified,
Unitsis typically used as the default - The unit of measure is required for each line item in the invoice
- Fractional quantities are allowed (e.g., 2.5 kilograms)
- The unit appears in the XML output’s
UnitOfMeasurefield - Choose the unit that best represents how the item is sold or billed
See Also
- Invoice::addItem() - Adding line items with units
- InvoiceItem - Line item configuration