Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit updates and compatibility with UN/ECE codes #223

Merged
merged 5 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 140 additions & 56 deletions data/schemas/org/unit.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,219 +4,303 @@
"$ref": "#/$defs/Unit",
"$defs": {
"Unit": {
"anyOf": [
"oneOf": [
{
"const": "mg",
"title": "Milligrams"
},
{
"const": "g",
"description": "Metric grams"
"title": "Metric grams"
},
{
"const": "kg",
"description": "Metric kilograms"
"title": "Metric kilograms"
},
{
"const": "t",
"description": "Metric tons"
"title": "Metric tons"
},
{
"const": "mm",
"description": "Milimetres"
"title": "Milimetres"
},
{
"const": "cm",
"description": "Centimetres"
"title": "Centimetres"
},
{
"const": "m",
"description": "Metres"
"title": "Metres"
},
{
"const": "km",
"description": "Kilometers"
"title": "Kilometers"
},
{
"const": "in",
"description": "Inches"
"title": "Inches"
},
{
"const": "ft",
"description": "Feet"
"title": "Feet"
},
{
"const": "m2",
"description": "Square metres"
"title": "Square metres"
},
{
"const": "m3",
"description": "Cubic metres"
"title": "Cubic metres"
},
{
"const": "ml",
"title": "Millilitres"
},
{
"const": "cl",
"description": "Centilitres"
"title": "Centilitres"
},
{
"const": "l",
"description": "Litres"
"title": "Litres"
},
{
"const": "w",
"description": "Watts"
"title": "Watts"
},
{
"const": "kw",
"description": "Kilowatts"
"title": "Kilowatts"
},
{
"const": "kwh",
"description": "Kilowatt Hours"
"title": "Kilowatt Hours"
},
{
"const": "rate",
"title": "Rate",
"description": "A unit of quantity expressed as a rate for usage of a facility or service."
},
{
"const": "mon",
"title": "Months",
"description": "Unit of time equal to 1/12 of a year of 365,25 days."
},
{
"const": "day",
"description": "Days"
"title": "Days"
},
{
"const": "s",
"description": "Seconds"
"title": "Seconds"
},
{
"const": "h",
"description": "Hours"
"title": "Hours"
},
{
"const": "min",
"description": "Minutes"
"title": "Minutes"
},
{
"const": "piece",
"description": "Pieces"
"title": "Pieces",
"description": "A unit of count defining the number of pieces (piece: a single item, article or exemplar)."
},
{
"const": "item",
"description": "Items"
"title": "Items",
"description": " A unit of count defining the number of items regarded as separate units."
},
{
"const": "pair",
"title": "Pairs",
"description": "A unit of count defining the number of pairs (pair: item described by two's)."
},
{
"const": "dozen",
"title": "Dozens",
"description": "A unit of count defining the number of units in multiples of 12."
},
{
"const": "assortment",
"title": "Assortments",
"description": "A unit of count defining the number of assortments (assortment: a collection of items or components of a single product packaged together)."
},
{
"const": "service",
"description": "Service Units"
"title": "Service Units",
"description": "A unit of count defining the number of service units (service unit: defined period / property / facility / utility of supply)."
},
{
"const": "job",
"title": "Jobs",
"description": "A unit of count defining the number of jobs."
},
{
"const": "activity",
"description": "Activity"
"title": "Activities",
"description": "A unit of count defining the number of activities (activity: a unit of work or action)."
},
{
"const": "trip",
"title": "Trips",
"description": "A unit of count defining the number of trips (trip: a journey to a place and back again)."
},
{
"const": "group",
"title": "Groups",
"description": "A unit of count defining the number of groups (group: set of items classified together)."
},
{
"const": "outfit",
"title": "Outfits",
"description": "A unit of count defining the number of outfits (outfit: a complete set of equipment / materials / objects used for a specific purpose)."
},
{
"const": "kit",
"title": "Kits",
"description": "A unit of count defining the number of kits (kit: tub, barrel or pail)."
},
{
"const": "basebox",
"title": "Base Boxes",
"description": "A unit of area of 112 sheets of tin mil products (tin plate, tin free steel or black plate) 14 by 20 inches, or 31,360 square inches."
},
{
"const": "pk",
"title": "Bulk Packs",
"description": "A unit of count defining the number of items per bulk pack."
},
{
"const": "bag",
"description": "Bags"
"title": "Bags"
},
{
"const": "box",
"description": "Boxes"
"title": "Boxes"
},
{
"const": "bin",
"description": "Bins"
"title": "Bins"
},
{
"const": "can",
"description": "Cans"
"title": "Cans"
},
{
"const": "tub",
"description": "Tubs"
"title": "Tubs"
},
{
"const": "case",
"description": "Cases"
"title": "Cases"
},
{
"const": "tray",
"description": "Trays"
"title": "Trays"
},
{
"const": "portion",
"description": "Portions"
"title": "Portions"
},
{
"const": "dozen",
"description": "Dozens"
"const": "set",
"title": "Sets",
"description": "A unit of count defining the number of sets (set: a number of objects grouped together)."
},
{
"const": "roll",
"description": "Rolls"
"title": "Rolls"
},
{
"const": "carton",
"description": "Cartons"
"title": "Cartons"
},
{
"const": "cylinder",
"description": "Cylinders"
"title": "Cylinders"
},
{
"const": "barrel",
"description": "Barrels"
"title": "Barrels"
},
{
"const": "jerrican",
"description": "Jerricans"
"title": "Jerricans",
"description": "Jerrican, cylindrical"
},
{
"const": "carboy",
"description": "Carboys"
"title": "Carboys"
},
{
"const": "demijohn",
"description": "Demijohn"
"title": "Demijohn"
},
{
"const": "bottle",
"description": "Bottles"
"title": "Bottles"
},
{
"const": "6pack",
"description": "Six Packs"
"title": "Six Packs"
},
{
"const": "canister",
"description": "Canisters"
"title": "Canisters"
},
{
"const": "pkg",
"description": "Packages"
"title": "Packages",
"description": "Standard packaging unit."
},
{
"const": "bunch",
"description": "Bunches"
"title": "Bunches"
},
{
"const": "tetrabrik",
"description": "Tetra-Briks"
"title": "Tetra-Briks"
},
{
"const": "pallet",
"description": "Pallets"
"title": "Pallets"
},
{
"const": "reel",
"description": "Reels"
"title": "Reels"
},
{
"const": "sack",
"description": "Sacks"
"title": "Sacks"
},
{
"const": "sheet",
"description": "Sheets"
"title": "Sheets"
},
{
"const": "envelope",
"description": "Envelopes"
"title": "Envelopes"
},
{
"const": "lot",
"title": "Lot"
},
{
"const": "unit",
"title": "Unit",
"description": "A type of package composed of a single item or object, not otherwise specified as a unit of transport equipment."
},
{
"pattern": "^(?:[a-z]|[a-z0-9][a-z0-9-+]*[a-z0-9])$",
"description": "Custom unit definition"
"pattern": "^[A-Z0-9]{2,3}$",
"description": "UN/ECE Unit Code from Recommendation 20"
}
],
"type": "string",
"title": "Unit",
"description": "Unit describes how the quantity of the product should be interpreted."
"description": "Unit describes how the quantity of the product should be interpreted either using a GOBL key, or UN/ECE code."
}
},
"$comment": "Generated with GOBL v0.63.0"
Expand Down
Loading
Loading