StoreCashierDocumentation Free 1.6.6 Pro 1.5.6 Apps 1.5.0

Units FREE PRO

A unit tells StoreCashier how a product is counted: Pieces, Kilogram, Box, Litre… Each product has one unit. The unit decides whether decimal quantities (for example 1.5 kg) are accepted when you enter opening stock.

Where: Inventory Management → Products → Units (admin.php?page=storecashier-products&view=units)
Units screen with the Add Unit form and the list of units
The Units screen: the form on top, your units below.

Fields#

FieldWhat it doesExample / default
Name *Full unit name shown in the product editors ("Name (Short)").Pieces, Kilogram, Box
Short Name *Short form shown next to quantities.Pc(s), kg, box
Allow decimal quantitiesTicked: quantities like 0.25 are allowed. Unticked: only whole numbers.Ticked for new units
Add as multiple of another unitReveals Times base unit (e.g. 12) and Base unit (e.g. Pieces) — "Example: 1 Box = 12 × Pieces." A unit cannot be its own base.Off
Add Unit form with Add as multiple of another unit ticked
A unit defined as a multiple: 1 Box of 12 = 12 × Pieces.

Buttons: Add (or Update when editing) and Cancel. Name and Short Name are required.

The units table#

Columns: Actions (Edit, Delete), Name, Short Name, Decimal (Yes/No) and Base unit (e.g. "1 Box = 12 Pc(s)" or "—"). Empty list: "No units yet — add Pieces, Kg, Box…".

Delete asks "Delete this unit?". A unit that is still used by any product cannot be deleted — change those products to another unit first.

Where units are used#

  • Product editors — the "Unit" field in the Pro editor (with a quick "+" add) and in the WooCommerce box. New products get the Default Unit from Settings → Products & stock.
  • Purchases — when the product's unit has larger units defined on top of it, the purchase line offers a unit drop-down next to Quantity (e.g. "Pc(s)" / "Box (× 12)") and converts to the base unit for stock.
  • Opening stock screen — whole-number units only accept whole numbers (decimal entries are skipped when saving).
  • Opening stock CSV — a decimal quantity for a whole-number unit is rejected: "Row N: Quantity 2.50 has decimals but unit does not allow decimals".
  • WooCommerce CSV — the "Unit" column accepts the unit id, short name or full name. See CSV import & export.
  • REST API — units are readable through the API.
Buying in boxes, selling in pieces. Give the product the base unit (e.g. Pieces) and define Box = 12 × Pieces. On a purchase you can then enter "2 Box" at a box price: quantity and unit cost are entered per the chosen unit, but stock is always kept in the base unit (2 Box → +24 pieces; a Box price of 120 → 10 per piece; switching the unit converts the price field). The stock-ledger note shows the conversion ("2 Box (× 12) = 24 Pc(s)"), and editing the purchase shows the quantity and price in the unit it was entered in. Lines with IMEI / serial numbers are always in the base unit.

Units are not converted anywhere else: the POS, sales, transfers, adjustments and returns work in the base unit only (returns show base quantities). The POS quantity box itself accepts decimals for any product; the decimal rule is enforced on opening stock.

Behind the scenes#

Units are stored in the sc_units table. When StoreCashier is activated it creates "Pieces / Pc(s)" (no decimals) and makes it the Default Unit if none is set. The product's unit is stored in the product meta _storecashier_unit and copied to the inventory record.

Permissions#

Viewing: Products & Stock → View. Adding, editing and deleting units: any Products & Stock write right (Add, Edit or Delete).

How to sell loose goods by weight#

  1. Add a unit: Name "Kilogram", Short Name "kg", tick Allow decimal quantities, click Add.
  2. Open the product, set Unit = Kilogram (kg), set the price per kg, save.
  3. Enter opening stock such as 12.5 kg.
  4. At the POS, change the line quantity to the weighed amount (e.g. 0.75).
Can I rename a unit that products already use?

Yes. Edit it; all products using it show the new name immediately.

Why was my opening quantity of 2.5 not saved?

The product's unit does not allow decimals. Tick "Allow decimal quantities" on the unit or use a whole number.