انتقل إلى المحتوى الرئيسي

Unit Classes & Units of Measure

Overview

Unit Classes and Units of Measure work together to define how quantities are expressed throughout the inventory system — on item records, purchase orders, sales documents, and stock counts.

A Unit Class is a measurement category (for example, Quantity, Volume, Weight, Length). Each class contains one or more Units of Measure that belong to that category (for example, Pieces, Dozen, and Box all belong to the Quantity class). Every unit in a class is defined by its relationship to the class's base unit, so the system can always convert between them.


Unit Classes

The Unit Classes list is found at Setup → Measurement Management → Unit class in the left navigation.

The Unit Classes List

The left panel shows all active unit classes. Each row displays:

ColumnDescription
NameThe measurement category (e.g. Quantity, Volume, Weight, Length)
DescriptionA short explanation of what the class covers

Use the toolbar to manage classes:

ActionDescription
+ NewCreate a new unit class
EditEdit the selected class's name or description
ArchiveArchive (soft-delete) the selected class
Archived unit classesView and restore previously archived classes
Units of measureSwitch the right panel to show the units within the selected class

Unit Class Details

Selecting a class from the list opens its details on the right:

FieldDescription
Unit class nameThe display name for this measurement category
DescriptionOptional free-text description
Base unitThe reference unit for all conversion calculations in this class
Preferred display unitThe unit shown by default on item cards and reports
ملاحظة

When a unit class is first created, the system automatically creates a base unit and sets it as both the base unit and the preferred display unit. You can add more units and change the preferred display unit at any time, but the base unit is fixed after creation.


Creating a Unit Class

  1. Select + New in the toolbar.
  2. Fill in the fields:
    • Unit class name (required) — the measurement category name. Maximum 100 characters. Must be unique.
    • Description (optional) — what this class covers. Maximum 500 characters.
    • Base unit name (required) — the name of the fundamental unit for this class. Maximum 100 characters.
    • Base unit symbol (required) — the short symbol used in tables and labels (e.g. pcs, ml, kg). Maximum 10 characters. Must be unique across all units.
    • Decimal precision (required) — the number of decimal places allowed when entering quantities in this unit. Must be between 0 and 10.
  3. Select Save.

The system creates the class and immediately creates the base unit you defined, assigning it as both the base unit and the preferred display unit.

Example — creating the Quantity class

Al Baraka sets up their Quantity class:

FieldValue
Unit class nameQuantity
DescriptionUnits for counting discrete items
Base unit namePieces
Base unit symbolpcs
Decimal precision0

After saving, the Quantity class exists with Pieces as its base unit.


Editing a Unit Class

  1. Select the class from the list.
  2. Select Edit in the toolbar.
  3. Update the Name or Description as needed.
  4. Select Save.
ملاحظة

The base unit and preferred display unit cannot be changed from the class edit form. To change the preferred display unit, manage it from the Units of measure view.


Archiving a Unit Class

Archiving removes a unit class from selection dropdowns throughout the system, but preserves all historical data. Any items that were previously assigned a unit class will continue to reference it — their records are not changed. The class simply becomes unavailable for new assignments.

  1. Select the class from the list.
  2. Select Archive in the toolbar.
  3. Confirm.

To view archived classes and restore them, select Archived unit classes in the toolbar.

warning

Archiving a unit class also makes all of its units of measure unavailable for new assignments. Existing records are unaffected.


Units of Measure

To manage the units within a class, select the class from the list, then select Units of measure in the toolbar. The right panel switches to show a table of all active units in that class.

Viewing Units

In view mode, the table shows:

ColumnDescription
NameThe full name of the unit (e.g. Pieces, Dozen)
SymbolThe short symbol used in documents and labels (e.g. pcs, dz)
Decimal precisionHow many decimal places are allowed for quantities in this unit
Relative labelHow one unit compares to the base unit (e.g. 12 pcs for Dozen)

The Relative label is a human-readable summary of the conversion factor — it always shows the equivalent in the base unit.

Example

Al Baraka's Quantity class units:

NameSymbolDecimal precisionRelative label
Piecespcs01 pcs
Dozendz012 pcs

How Conversion Factors Work

Every unit is defined by two things: a reference unit (another unit in the same class) and a factor to that reference unit. The system calculates the factor to the base unit automatically:

Factor to base unit = Factor to reference unit × Reference unit's factor to base unit

This chain means you can define units relative to any existing unit in the class — you do not have to always reference the base unit directly. The system traces the chain and computes the absolute factor for you.


Adding a Unit of Measure

When the Units of measure panel is in edit mode, a blank row appears at the top of the table for entering a new unit. The edit mode columns are:

ColumnDescription
NameFull name for the new unit
SymbolShort symbol. Maximum 10 characters. Must be unique across all units system-wide.
Decimal precisionDecimal places allowed (0 – 10)
Factor to reference unitHow many reference units equal one of this new unit. Must be greater than 0.
Reference unitWhich existing unit in this class to use as the reference point

Steps:

  1. Select the unit class from the list.
  2. Select Units of measure, then switch to edit mode.
  3. In the blank row at the top, fill in all columns.
  4. Select Save.
Example — adding Dozen to the Quantity class

Al Baraka wants to receive perfume bottles by the dozen. They add:

NameSymbolDecimal precisionFactor to reference unitReference unit
Dozendz012Pieces (pcs)

Calculated factor to base: 12 × 1 = 12 pcs per dozen.

When a purchase order is received for 5 dz, the system records 60 pcs in stock.


Editing a Unit of Measure

  1. Select the class, then select Units of measure.
  2. Switch to edit mode.
  3. Update the Name, Decimal precision, Factor, or Reference unit for any existing row.
  4. Select Save.
ملاحظة

A unit's Symbol cannot be changed after creation, as it is used as a permanent reference throughout existing records and reports.


Archiving a Unit of Measure

  1. Select the unit class from the list.
  2. Select Units of measure.
  3. Select the unit you want to archive.
  4. Select Archive in the toolbar.

Archived units are removed from dropdowns but remain in the database. Items and transactions that previously referenced an archived unit continue to display it — their records are not changed.

To view and restore archived units, select Archived units in the toolbar.


Validation Rules

Unit Class

FieldRule
NameRequired · Maximum 100 characters · Must be unique
DescriptionOptional · Maximum 500 characters
Base unit nameRequired · Maximum 100 characters
Base unit symbolRequired · Maximum 10 characters · Must be unique across all units
Decimal precisionRequired · Integer between 0 and 10

Unit of Measure

FieldRule
NameRequired · Maximum 100 characters
SymbolRequired · Maximum 10 characters · Must be unique across all units
Decimal precisionRequired · Integer between 0 and 10
Reference unitRequired · Must belong to the same unit class
Factor to reference unitRequired · Must be greater than 0

Planning Your Measurement Setup

A well-structured measurement setup makes purchasing, receiving, and reporting straightforward. Here is how Al Baraka organised theirs:

Unit classBase unitAdditional unitsUsed for
QuantityPieces (pcs, 0dp)Dozen (dz, ×12), Box of 24 (box, ×24)All countable finished goods and components
VolumeMillilitre (ml, 2dp)Litre (L, ×1000), Fluid Ounce (fl oz, ×29.57)Bulk essential oils, carrier oils, and liquid ingredients
WeightGram (g, 3dp)Kilogram (kg, ×1000), Milligram (mg, ×0.001)Solid raw materials, resins, and waxes
LengthMillimetre (mm, 0dp)Centimetre (cm, ×10), Metre (m, ×1000)Ribbon, label stock, and packaging film
Best practice

Define the base unit at the smallest practical granularity — for volume this is millilitres, not litres. This gives you the most flexible conversion chain and prevents rounding errors when converting between units.