<!-- source: https://docs.opticcount.com/en/guide/packages -->
# Packages and parent barcodes

This page explains the two ways to count cartons and packs without opening them: **Package Quantity** when the package carries the same barcode as the unit, and **Parent barcode** when the package has a barcode of its own.

::: tip TL;DR
| Situation | What you set up | How stock is stored |
|---|---|---|
| The carton has the **same** barcode as the unit | **Package Quantity** in the catalog | in units – multiplied at scan time |
| The carton has a **different** barcode | **Parent barcode** + **Conversion ratio** in the catalog file | in units – parent scans converted in the report |
:::

Both are configured in the [Catalog](/en/guide/management/catalog) and used on the [Count page](/en/guide/counter).

## Package Quantity – same barcode on the unit and the package

### How to set it up

- **In the catalog file:** add a **Package Quantity** column with a whole number for each relevant item.
- **Manually:** **Catalog** → edit an item → **Package Quantity** field.

An item with no value in the field is always counted in units.

### How to count

When you scan an item with a package quantity, the [quantity window](/en/guide/counter#quantity-window) shows **Package contains: N units** and a toggle:

- **Units Mode** (default) – the number you type is recorded as is.
- **Package Mode** – the message **Quantity will be multiplied by N** appears, and the number you type is multiplied.

**Example:** package quantity 12. In **Package Mode** you type `2` → **24 units** are recorded.

The multiplication happens at scan time, so the stored quantity is always in units. Count whole cartons in **Package Mode** and opened units in **Units Mode**. The toggle appears only while the quantity window is open – turn on **Show Quantity Window After Scan** in [Settings](/en/guide/settings).

## Parent barcode – the package has its own barcode

The carton is the **parent**; the unit inside is the **child**. Stock is managed at unit level; the parent is only a faster way to count cartons.

### How to set it up

A parent barcode is defined in the catalog file, on the child item's row. Add these columns:

| Column header | Required | Meaning |
|---|---|---|
| **Parent barcode** | ✔ | The barcode printed on the case. |
| **Conversion ratio** | ✔ | Units in one parent case, e.g. `6`. |
| **Parent barcode name** | – | A name for the case. If empty, the item's description is used. |

The child's own barcode stays in the regular **Barcode** column. A parent is created only when both required columns are filled; if either is missing, the row is loaded as an ordinary item.

OpticCount stores the parent as a separate catalog item tagged **Parent**. You do not manage it by hand – re-uploading the catalog updates it. A parent barcode that equals another item's barcode is rejected and reported in the upload summary, because a barcode identifies exactly one item.

### How to count

Scan the barcode you see. A unit barcode is counted in units; a parent barcode is recognized automatically and recorded as a parent scan in the quantity you entered, without multiplication. There is no toggle to choose – the barcode itself decides.

### How it appears in reports

On [Recent Counts](/en/guide/management/counts) and in exports:

- **Not merged (default):** parent scans and unit scans on separate rows, each in the quantity actually scanned. A parent row has no ERP stock of its own.
- **Merge by parent:** the **Merge by parent** option in the table (and **Merge parent into child** in the export) multiplies parent scans by the conversion ratio and folds them into the unit row.

**Example:** 5 parent scans × ratio 10 = 50, plus 2 unit scans = **52 units** for the item. ERP-format exports always merge by parent, because the inventory system only knows the unit's code.

## Editing recorded counts

A count recorded either way is edited like any other: from the quantity button on the card, or on [Recent Counts](/en/guide/management/counts) by a user with permission.

## Common questions

- **Which mechanism should I use?** Same barcode on the unit and the carton → Package Quantity. Different barcode → Parent barcode.
- **The catalog shows more items than rows in my file.** Expected: every parent barcode adds one parent item tagged **Parent**.
- **Does a parent hold its own stock?** No. Stock lives at unit level; the parent is a scanning shortcut.
- **My file's headers are slightly different.** OpticCount recognizes similar names, and you can map columns manually during upload. An exact header is the safest.

## Related pages

- [Catalog](/en/guide/management/catalog) – upload a file with package quantity and parent barcode
- [Count page](/en/guide/counter) – scan and work with the quantity window
- [Personalization Settings](/en/guide/settings) – turn on the quantity window
- [Recent Counts](/en/guide/management/counts) – merge parent scans in the report
