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

# How to Record and Track a Production Batch in Avstarna

> Step-by-step guide to running a production batch in Avstarna: create a PBN, register inventory output, record transactions, and maintain traceability.

Every production run in Avstarna is tracked through a **Production Batch Number (PBN)** — a unique identifier that ties together output records, inventory, and distribution data for a single batch. Whether you're running a small daily production or a large weekly run, the PBN workflow gives you full traceability from the factory floor to the warehouse.

The production workflow in Avstarna follows two sequential stages:

1. **Output & Distribution** — where you create the PBN, record what was produced, and log distribution transactions.
2. **Inventory Registration** — where finished production is registered as warehouse stock, linked to the PBN for traceability.

Navigate to **Output** from the main menu to access both stages.

## Step-by-Step: Running a Production Batch

<Steps>
  <Step title="Create a new PBN">
    Go to **Output** and click **Add Record**. You will be asked whether your PBN has already been printed or is handwritten (not yet recorded):

    * **Handwritten (PBN not yet recorded)** — select this to create a brand-new PBN record.
    * **Printed (PBN already recorded)** — select this to find and reuse an existing PBN.

    If creating a new PBN, fill in:

    * **Product** — select the product being produced in this run.
    * **Production Batch Number** — enter your PBN. Use a consistent naming convention (e.g., `YYYYMMDD-ProductCode-Run#`) to make batches easy to find and sort later.

    Click **Create** to save the PBN. It now appears in the Output overview.

    <Tip>
      Establish a standard PBN naming convention across your team early on. Consistent batch names make searching, filtering, and audit reporting significantly easier.
    </Tip>
  </Step>

  <Step title="Register inventory from the PBN">
    Open the PBN record from the Output overview. In the **Action** panel on the right, click **Register Inventory**. This opens the inventory registration form, where you can:

    * Confirm the PBN the inventory is linked to.
    * Assign the registration tasks to the relevant workers.

    Submitted inventory tasks appear in the **Inventory Registration** workflow, where workers can complete them.

    <Note>
      If the PBN you need already exists and is linked to previous inventory, the action panel will show the existing inventory records so you can navigate directly to them.
    </Note>
  </Step>

  <Step title="Record distribution transactions">
    Back on the PBN detail page, open the **Distribution Record** section to log the quantities produced. Enter:

    * **Crates** — the number of crates in this batch.
    * **Approx. items per crate** — to calculate the total item count.
    * **Total items** — the confirmed total output for this batch.
    * **Disposed** / **Internal use** — any units written off or consumed internally.

    Click **Edit** to save the transaction record. This finalises the output record and makes the batch available for distribution planning.

    <Tip>
      If the actual output differs from your planned quantity, record the real figures. Avstarna tracks totals per batch so you can identify yield trends over time.
    </Tip>
  </Step>

  <Step title="Complete inventory registration">
    Navigate to **Output → Inventory Registration** and open the task created in step 2. Workers complete the registration by confirming the product, quantity, and storage details. Once saved, the stock levels on the Inventory page update immediately and the inventory record is linked back to the PBN.
  </Step>
</Steps>

## Traceability and Batch Linking

<Accordion title="Why link inventory to a PBN?">
  Linking inventory records to a PBN gives you end-to-end traceability: you can trace any unit in stock back to the exact batch it came from and when it was produced. This is critical for quality recalls, customer queries, and regulatory audits. Always confirm the PBN is correctly associated before saving an inventory record.
</Accordion>

<Accordion title="Searching and filtering PBNs">
  From the **Output** overview, use the search bar to look up batches by PBN or product name. The list view shows each batch alongside its creation date and linked product, so you can quickly identify any batch that needs attention.
</Accordion>
