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

# Stock Counts

> Count your physical inventory and let Mathership adjust your book stock automatically

# Stock Counts

Stock counts help you compare the stock that Mathership expects with the quantity that is actually available in a storage unit.

Use stock counts when you want to check your inventory, correct differences, or prepare a full inventory count.

<CardGroup cols={3}>
  <Card title="Count physical stock" icon="clipboard-check">
    Enter counted quantities for ingredients in a selected storage unit.
  </Card>

  <Card title="Review variances" icon="scale-balanced">
    Compare counted stock with book stock before posting adjustments.
  </Card>

  <Card title="Adjust automatically" icon="wand-magic-sparkles">
    Let Mathership create inventory adjustments when posted counts differ from book stock.
  </Card>
</CardGroup>

## What a stock count does

During a stock count, you select a storage unit and enter the counted quantity for one or more ingredients.

When the stock count is posted, Mathership compares the counted quantity with the current book stock.

**Difference = Counted quantity − Book stock**

If there is a difference, Mathership creates an inventory adjustment.

| Situation                                  | Result              |
| ------------------------------------------ | ------------------- |
| Counted quantity is higher than book stock | Positive adjustment |
| Counted quantity is lower than book stock  | Negative adjustment |
| Counted quantity equals book stock         | No adjustment       |

### Example

| Ingredient | Book stock | Counted stock | Difference | Result              |
| ---------- | ---------: | ------------: | ---------: | ------------------- |
| Flour      |      10 kg |         12 kg |      +2 kg | Positive adjustment |
| Butter     |       5 kg |          3 kg |      −2 kg | Negative adjustment |
| Sugar      |       8 kg |          8 kg |       0 kg | No adjustment       |

After posting the count, the book stock matches the counted stock.

## How to open a stock count

Stock counts are started from a storage unit's detail page.

A storage unit can be, for example:

* Main storage
* Bar storage
* Kitchen storage
* Dry storage
* Freezer

<Steps>
  <Step title="Open storage units">
    Go to **Manage** → **Storage Units**.
  </Step>

  <Step title="Open a storage unit">
    Select the storage unit you want to count.
  </Step>

  <Step title="Start stock count">
    Click **Stock count** to open the stock count sheet.
  </Step>
</Steps>

## Session behavior

When you open the stock count sheet, Mathership automatically starts a count session for the selected storage unit.

If there is already an open count for that storage unit, Mathership opens the existing session instead of creating a new one. Any lines you previously added are loaded back.

This prevents duplicate open counts for the same storage unit.

The sheet header shows the storage unit name and when the session was started.

## Stock count statuses

| Status   | Meaning                                                      |
| -------- | ------------------------------------------------------------ |
| `OPEN`   | The count is still being edited                              |
| `POSTED` | The count has been posted and stock adjustments were created |

Only open stock counts can be edited.

Once a count is posted, it is closed.

## Adding ingredients to the count

The bottom of the stock count sheet has a form for adding new lines.

For each ingredient:

| Field            | Example                             |
| ---------------- | ----------------------------------- |
| Ingredient       | Flour                               |
| Base unit        | kg                                  |
| Counted quantity | 12 in kg, or 1 box if 1 box = 12 kg |

<Steps>
  <Step title="Select an ingredient">
    Choose the ingredient you want to count.
  </Step>

  <Step title="Enter the counted quantity">
    Enter the physical quantity you counted.
  </Step>

  <Step title="Choose the unit">
    Use the base unit or a packaging unit if available.
  </Step>

  <Step title="Add the line">
    Add the ingredient to the current stock count session.
  </Step>
</Steps>

## Entering quantities in packaging units

If an ingredient has packaging levels configured, you can enter the counted quantity in those units instead of the base unit.

Example for flour with packaging levels:

* 1 Box = 10 kg
* 1 Bag = 1 kg

| You enter | Unit | System converts to |
| --------: | ---- | -----------------: |
|         2 | Box  |              20 kg |
|         5 | Bag  |               5 kg |
|        12 | kg   |              12 kg |

When the entered unit differs from the base unit, the sheet shows the converted base quantity in real time so you can confirm the conversion is correct before adding the line.

## Count lines table

Once lines are added, they appear in the table at the top of the sheet.

Each row shows:

| Column     | Description                                                          |
| ---------- | -------------------------------------------------------------------- |
| Ingredient | Ingredient name with the current system on-hand quantity shown below |
| Counted    | The counted quantity in packaging breakdown format                   |
| Variance   | Real-time comparison of counted vs book stock                        |
| Actions    | Edit and Delete buttons                                              |

## Variance badge

The variance badge updates in real time as you type.

| Badge          | Meaning                                                            |
| -------------- | ------------------------------------------------------------------ |
| Match, grey    | Counted quantity equals book stock — no adjustment will be created |
| +X unit, green | Counted is higher than book stock — positive adjustment            |
| −X unit, red   | Counted is lower than book stock — negative adjustment             |

## Editing a count line

Click the pencil icon on any line to edit its quantity inline.

The row switches to edit mode showing:

* A quantity input field
* A unit dropdown, using the base unit or packaging levels
* A numpad toggle button

The variance badge updates live as you type.

Click the save icon to confirm or the **X** icon to cancel.

## Updating counted quantities

If you add the same ingredient again, Mathership updates the existing counted quantity instead of creating a duplicate line.

| Action                     | Result                      |
| -------------------------- | --------------------------- |
| Add Flour with 10 kg       | Flour is added to the count |
| Add Flour again with 12 kg | Flour is updated to 12 kg   |

## Removing an ingredient from the count

Click the trash icon on any line to remove it from the count.

This only removes the line from the current count session.

It does not delete the ingredient itself and does not change stock.

Stock is only changed when the count is posted.

## Posting the stock count

When all quantities are entered and reviewed, click **Post count** in the footer.

The **Post count** button is disabled if there are no lines in the count.

When you post a stock count, Mathership:

1. Calculates the difference for each counted ingredient
2. Creates adjustment ledger entries for non-zero differences
3. Updates the stock balance through the inventory ledger
4. Marks the stock count session as `POSTED`
5. Saves the posting date and time

## Adjustment logic

When an adjustment is created, Mathership uses the following formula:

**Difference = Counted quantity − Current book stock**

| Counted quantity | Book stock |    Adjustment |
| ---------------: | ---------: | ------------: |
|            12 kg |      10 kg |         +2 kg |
|             3 kg |       5 kg |         −2 kg |
|             8 kg |       8 kg | No adjustment |

If the difference is zero, no ledger entry is created.

## Cost value of adjustments

When an adjustment is created, Mathership uses the weighted average cost of the ingredient.

The weighted average cost is calculated from previous receipt entries.

If no receipt cost exists yet, the cost value may be `0`.

## Example posting result

Before posting:

| Ingredient | Book stock | Counted stock |
| ---------- | ---------: | ------------: |
| Flour      |      10 kg |         12 kg |
| Butter     |       5 kg |          3 kg |

After posting:

| Ingredient | Adjustment | New book stock |
| ---------- | ---------: | -------------: |
| Flour      |      +2 kg |          12 kg |
| Butter     |      −2 kg |           3 kg |

## Partial counts

You can use stock counts for full inventory or for partial checks.

| Use case         | Description                                   |
| ---------------- | --------------------------------------------- |
| Full inventory   | Count all ingredients in a storage unit       |
| Spot check       | Count only selected ingredients               |
| High-value check | Count expensive ingredients more often        |
| Problem check    | Count ingredients where stock seems incorrect |

## Stock count workflow

The typical workflow is:

<Steps>
  <Step title="Open a storage unit">
    Go to **Manage** → **Storage Units** and open a storage unit.
  </Step>

  <Step title="Open Stock count">
    Click **Stock count**.
  </Step>

  <Step title="Add ingredients">
    Add ingredients and enter counted quantities.
  </Step>

  <Step title="Review variances">
    Use the variance badge to review differences while counting.
  </Step>

  <Step title="Correct lines if needed">
    Edit any lines where quantities need correction.
  </Step>

  <Step title="Post the count">
    Click **Post count**.
  </Step>

  <Step title="Review adjustments">
    Mathership creates inventory adjustments where needed.
  </Step>
</Steps>

## What happens after posting

After posting, Mathership:

1. Calculates the difference for each counted ingredient
2. Creates `ADJUST` ledger entries for non-zero differences
3. Updates the stock balance through the inventory ledger
4. Marks the stock count session as `POSTED`
5. Saves the posting date and time

The adjustment entries appear in the inventory ledger with transaction type `ADJUST` and can be reviewed there.

## Best practices

<CardGroup cols={2}>
  <Card title="Use clear storage units" icon="warehouse">
    Set up clear storage units before starting stock counts so counted stock matches the physical location.
  </Card>

  <Card title="Count in packaging units" icon="boxes-stacked">
    If your team counts in boxes, bags, or crates, use packaging units to reduce errors.
  </Card>

  <Card title="Review variance before posting" icon="scale-balanced">
    The live variance helps you spot obvious mistakes before adjustments are posted.
  </Card>

  <Card title="Post only after review" icon="clipboard-check">
    Once posted, the stock movement becomes part of the inventory ledger.
  </Card>

  <Card title="Use partial counts regularly" icon="magnifying-glass">
    Smaller spot checks keep stock values more accurate during daily operations.
  </Card>

  <Card title="Use the numpad on touchscreens" icon="calculator">
    The calculator icon in the quantity input toggles a numpad for easier tablet entry.
  </Card>
</CardGroup>

## Related pages

<CardGroup cols={2}>
  <Card title="Storage Units" icon="warehouse" href="/en/restaurants/inventory/storage-units">
    Learn how storage units are used to separate stock by location.
  </Card>

  <Card title="Ingredients" icon="wheat-awn" href="/en/restaurants/inventory/ingredients">
    Learn how ingredients, base units, and stock quantities work.
  </Card>

  <Card title="Receiving Orders" icon="truck-ramp-box" href="/en/restaurants/inventory/receiving-orders">
    Learn how received vendor orders increase inventory stock.
  </Card>

  <Card title="Waste" icon="trash" href="/en/restaurants/inventory/waste">
    Learn how waste postings reduce inventory stock.
  </Card>
</CardGroup>
