> ## Documentation Index
> Fetch the complete documentation index at: https://muveya.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Presentations and codes

> Describe the packages a supply is bought in, attach the codes printed on them, and correct, move or retire both safely.

A *presentation* is a package a supply is bought and received in, such as a box of 100 gloves. It says how many base units of the supply it contains, so that receiving 3 boxes of 100 adds exactly 300 units to stock.

A *code* is an identifier printed on that package: a barcode (GTIN), a supplier's reference or a code your clinic assigns. When someone scans or types a code on the receiving screen, muveya finds the presentation, and through it the supply and the quantity.

<Info>
  Package codes say *what* a product is: every box of the same article carries the same code. They are different from box codes such as `BX-000123`, which identify *which* physical container is on the shelf. Box codes are created when stock is received. See [Stock boxes](/docs/en/inventory/boxes).
</Info>

<Warning>
  The supply form has a free-text field called **Packaging**. That field is only a description and never changes a quantity. This page is about the **Presentations** section of the supply detail page, which is what muveya counts with.
</Warning>

## What is available

| Available on the current release | Not available |
| - | - |
| List the presentations of a supply, with their codes. | Nested packages (a box that contains boxes). Model the outer package as its own presentation with the total base units. |
| Add, correct and retire a presentation. | Reactivating a retired presentation. Publish a new one instead. |
| Add a code, move it to another presentation of the same supply, and retire it. | Editing a code's value. Retire it and add the right one. |
| Scan codes on the receiving screen. | Presentations or codes in the CSV import or export. |
| | Presentations or codes in the public API or MCP. |

## Who can do it

| Action | Permission |
| - | - |
| See presentations and codes | `catalog.read` (every role), `catalog.manage` or `inventory.receive` |
| Add, correct or retire a presentation; add, move or retire a code | `catalog.manage` |

See [Roles and permissions](/docs/en/account/roles-and-permissions).

## Where

Open a supply from **Catalog**. The **Presentations** section is below the status section, with the description **How this supply is bought and received. Receiving N of a presentation adds N × its content.**

Each presentation shows:

* Its name, for example "Box of 100".
* Its content, for example **Contains 100 × Unit**.
* Its version and status, for example **Version 2** and **Active** or **Retired**.
* **Correct** and **Retire** buttons, for managers, on active presentations.
* Below it, **Codes of** followed by the presentation name, with the active codes.

The list shows the current version of every presentation, retired ones included. When the supply has none, it shows **No presentations yet** and, for managers, **Add the package you buy, such as a box of 100, and the code printed on it.** (others read **A catalog manager can add presentations to this supply.**).

## Add a presentation

<Steps>
  <Step title="Open the dialog">
    In **Presentations**, click **Add presentation**. The dialog **New presentation** opens.
  </Step>

  <Step title="Name it">
    Enter the **Presentation name** as your team calls the package, up to 120 characters.
  </Step>

  <Step title="Say what it contains">
    Enter **Base units it contains**: a whole number from 1 to 1,000,000,000. The help line reminds you of the supply's unit, for example **Base unit of this supply: Unit.**
  </Step>

  <Step title="Publish">
    Click **Publish presentation**. The list shows the new presentation and the screen announces it was published as version 1.
  </Step>
</Steps>

You can add presentations while the supply is still a draft. The presentation keeps a copy of the supply's unit at the time it is published.

### Examples

| Supply unit | Package | Presentation name | Base units it contains |
| - | - | - | - |
| **Unit** | Box of 100 gloves | Box of 100 | `100` |
| **Unit** | Carton of 3 boxes of 100 gloves | Carton 3 × 100 | `300` |
| **Milliliter** | 500 ml bottle of disinfectant | Bottle 500 ml | `500` |
| **Box** | A box counted as one | Box | `1` |

Decimals are not accepted: if a package holds half a unit, choose a smaller base unit for the supply before it is fixed.

## Correct a presentation

A correction never edits the stored presentation. It publishes the next version and leaves the earlier one readable, because boxes received under version 1 must keep meaning what they meant.

<Steps>
  <Step title="Open the dialog">
    Click **Correct** on the presentation. The dialog **Correct** followed by the name opens with the current values and the note **A correction publishes version 3. Boxes already received keep the version they were received under.** (with the next version number).
  </Step>

  <Step title="Change the values">
    Edit **Presentation name** or **Base units it contains**.
  </Step>

  <Step title="Publish">
    Click **Publish correction**. The screen announces the new version.
  </Step>
</Steps>

* The codes of the presentation stay attached: they belong to the presentation, not to one version.
* A correction also republishes the presentation under the supply's current unit. Use it if the supply's unit changed after the presentation was published.
* If someone receives stock with the presentation while you correct it, the receiving screen stops and shows the new content. See [Receive stock](/docs/en/inventory/receive).

## Retire a presentation

<Steps>
  <Step title="Open the dialog">
    Click **Retire** on the presentation.
  </Step>

  <Step title="Confirm">
    The dialog asks **Retire** followed by the name and warns **It can no longer be received. Boxes and movements already recorded keep their quantities. This cannot be undone.** Click **Retire presentation**.
  </Step>
</Steps>

Retiring marks every version of the presentation as **Retired**. It stays in the list without **Correct** or **Retire**. Its codes stay listed so you can move or retire them; a scan of a code that still points to it tells the receiver **This presentation is retired and no longer accepts new entries.** To keep receiving that package, add a new presentation and move the codes to it.

## Codes

### Code types

| Type | Label | What it is | Format |
| - | - | - | - |
| `supplier` | **Supplier code** | The supplier's own catalogue reference. The form selects this type by default. | 1 to 64 characters. |
| `gtin` | **GTIN (barcode)** | The barcode family printed on retail and logistics packages (EAN-13, UPC-A, ITF-14). | 8 to 14 digits. |
| `internal` | **Internal code** | A code your clinic assigns and prints itself. | 1 to 64 characters. |

### Add a code

<Steps>
  <Step title="Open the dialog">
    Under **Codes of** the presentation, click **Add code**. Only active presentations offer it.
  </Step>

  <Step title="Fill in the code">
    Choose the **Code type**, type the **Code** (**Exactly as printed, leading zeros included.**) and, if useful, the **Issuer (optional)**, for example the supplier's name, up to 120 characters.
  </Step>

  <Step title="Save">
    Click **Add code**. The code appears in the list with its type and, if given, **Issued by** and the issuer.
  </Step>
</Steps>

How muveya reads a code:

* Spaces and hyphens are ignored and letters are compared in upper case. `7 501234 567890` and `7501234-567890` are the same code. The list keeps showing the code as printed.
* A GTIN keeps its leading zeros. After removing spaces and hyphens it must have 8 to 14 digits, or the form says **A GTIN has 8 to 14 digits.**
* A GTIN's check digit is verified. If it does not match, the code is still saved and marked with **The check digit does not match. Confirm the printed code.** Real labels are sometimes wrong, and refusing them would stop the clinic from recording stock it holds.
* A code of a given type can be active on one presentation only, across your whole dental clinic. Adding it to a second presentation fails with **Another presentation already uses this code. Retire it or move it there first.** Adding it again to the same presentation changes nothing.
* The same value can exist under two different types, for example as a GTIN on one presentation and as a supplier code on another. A scan of that value then asks the receiver to choose: **This code names more than one presentation. Choose the one that arrived.**

### Move a code

Use it when a code was attached to the wrong package of the same supply.

<Steps>
  <Step title="Open the dialog">
    Click **Move** next to the code. The dialog **Move code** explains **Choose another active presentation of this supply. The code leaves** the current presentation **in the same step.**
  </Step>

  <Step title="Choose the target">
    In **Move to**, choose a presentation (**Choose a presentation**). Only other active presentations of the same supply are offered. If there is none, the dialog says **Add another active presentation of this supply first.**
  </Step>

  <Step title="Confirm">
    Click **Move code**. The code moves with its printed value, issuer and check digit warning.
  </Step>
</Steps>

To move a code to a different supply, retire it here and add it to a presentation of the other supply.

### Retire a code

<Steps>
  <Step title="Open the dialog">
    Click **Retire** next to the code.
  </Step>

  <Step title="Confirm">
    The dialog warns that receiving stops finding the presentation by this code and that **You can add it again later.** Click **Retire code**.
  </Step>
</Steps>

The code disappears from the list and scans no longer find it. muveya keeps the retired code, who retired it and when, as evidence.

## How receiving uses them

On [Receive stock](/docs/en/inventory/receive), the receiver scans or types a code. muveya looks it up across the three types:

| Result | What the receiver sees |
| - | - |
| One presentation | The supply and presentation are filled in. Receiving N adds N × the presentation's content. |
| Several presentations | A choice between them. |
| No presentation | **That code is not linked to a supply yet. Open the supply in the catalog and add the code under Presentations, or choose the supply to receive it without a code.** |

Codes can only be attached from the catalog, not from the receiving screen.

## What the system records

* Each presentation version is stored permanently with its name, content, the supply's unit at the time and who published it. A box received through a presentation records which version it was received under.
* Retiring a presentation marks all its versions as retired. No quantity already recorded changes.
* Each code records who added it. Retiring or moving a code keeps the old row with who retired it and when, and writes an audit entry, `catalog.identifier.retired`, that for a move also names the target presentation.

Internally a presentation has a stable `presentationId` shared by all its versions and a `version` number. The console never shows these ids.

## What can go wrong

| Message | Code | What to do |
| - | - | - |
| **Another presentation already uses this code. Retire it or move it there first.** | `catalog.identifier_taken` | Find the presentation that has it, then retire or move it. |
| **Someone corrected this presentation at the same time. Review the current version and apply your change again.** | `catalog.presentation_version_conflict` | Close the dialog, check the new version and correct again if needed. |
| **This presentation is retired. Choose an active one.** | `catalog.presentation_retired` | Use or create an active presentation. |
| **This code is no longer on this presentation. Review the list.** | `catalog.identifier_not_found` | Someone moved or retired it; refresh the page. |
| **This code is not valid for the chosen type.** | `catalog.identifier_invalid` | Check the type; a GTIN must be 8 to 14 digits. |
| **The content must be a whole number of base units from 1.** | `catalog.presentation_invalid_content` | Enter a whole number from 1 to 1,000,000,000. |
| **This presentation is not available for this supply.** | `catalog.presentation_not_found` | Refresh the page; the presentation belongs to another supply or no longer exists. |
| **Presentations could not be loaded.** | | Click **Try again**. |
| **Enter a whole number from 1.** | | Fix **Base units it contains**. |
| **Complete this field.** / **Use no more than 120 characters.** | | Fix the name or issuer. |
| **Your account does not have permission for this action.** | `tenants.insufficient_role` | Ask for `catalog.manage`. |

## Related pages

<CardGroup cols={2}>
  <Card title="Receive stock" icon="truck-ramp-box" href="/docs/en/inventory/receive">
    Scan a code and receive packages into a warehouse.
  </Card>

  <Card title="Catalog items" icon="box" href="/docs/en/catalog/items">
    Set the supply's base unit.
  </Card>

  <Card title="Stock boxes" icon="boxes-stacked" href="/docs/en/inventory/boxes">
    The containers created when stock arrives.
  </Card>

  <Card title="Roles and permissions" icon="user-shield" href="/docs/en/account/roles-and-permissions">
    Who can manage the catalog.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.