<!-- Source: https://lazyjack.app/guide/inventory.md -->

# Inventory and To buy

Inventory is what you keep in the lockers: spares, filters, consumables, tools, food. This chapter explains how LazyJack knows what is aboard, how it works out what to buy, and how orders and kits fit in. It is under the Boat area, as the Inventory view.

The one idea to take away: LazyJack never guesses how many of something you have. It knows only what has been recorded, and until an item has been counted it says so.

## Items {#items}

An **item** is a kind of thing ("Oil filter Volvo 3517857"), not a single object. Its **stock** is how many are where. The item holds what is true of every one of them; the stock entries hold what happened.

| Field on the item | What it is for |
|---|---|
| Name | Required. The only field a new item needs. |
| Category | One of 29 built-in categories (Engine, Filters, Anodes, Safety & security, Food & provisions...) or one you add. Items are listed under it. |
| Counted in | Each, Packs, Litres, Metres or Kilograms. Fixed once any stock has been recorded for the item. |
| Keep at least | The minimum you want on the boat. Below it the item is Low, and the shortfall goes on the shopping list. |
| Where to buy, purchase link | Shown on the shopping list. |
| Typical price | In the boat's currency. Used until you have bought the item; after that the last price paid is used. |
| Fits equipment | The equipment it belongs to. The item then shows on that equipment's page under **Items that fit**. |
| Equivalent items | Other items that can stand in for this one. Equivalents count towards each other's needs. |
| Attach a document | A photo or a file, saved as a document attached to the item (and to its equipment when it fits exactly one). |

**Add item** asks for the name, **How many do you have?** and **Where**; the rest is behind More details. Typing a quantity there records it as starting stock, so the new item is counted from the start.

## Locations {#locations}

A **location** is where things are kept: a locker, the engine room, a bag. A location is either on the boat or **away from the boat** (a garage, a storage unit, home).

- **Stock away from the boat does not count as aboard.** It shows as "elsewhere" on the item and is not used to cover what a job or kit needs.
- **Unassigned** holds stock recorded with no location. It has a page like any location.
- **A location's page** lists the items with stock there and when the soonest batch expires. **Count** is its main action; **Add item here** starts a new item with this location filled in; **Move** on each row moves that item out.
- **Count** on a location's page is one form for the whole locker: a number per item, prefilled with what is recorded. Only the numbers you change are saved, as corrections. **Add an item to this count** puts an existing item into this location without receiving it.
- **A location with stock in it cannot be archived.** The app answers "Move the stock out of this location before archiving it."

## Recording stock {#stock}

Stock changes only through stock entries. The item's own form never changes how many there are. Each entry is kept in the item's **Stock history**.

| Action | What it records | Notes |
|---|---|---|
| **Received** | Stock bought or brought aboard, into a location | Optional expiry date (today or later), price each, and a receipt or photo. Against an order, it takes the quantity off that order. |
| **Used** | Stock taken out | Choose **Used** or **Discarded** under "What happened". Only from a location that has stock. |
| **Count** | What is really there, at one location | The difference from the record is saved as a correction ("Adjusted"). |
| **Move** | Stock moved between two locations | One change with two entries, out of one and into the other. |

**Received with a price is a purchase.** With a price above zero, **Record as an expense** is ticked by default and saving adds a paid expense, titled "Bought: <item>" in the Parts category, for the total. It is linked to the receipt and opens from the history's "see expense". When exactly one unfinished project's kits need the item, the expense is put under that project. Untick the box to record the stock without an expense.

**Did the job uses stock too.** When a job lists items needed, Did the job offers them under **Items used**, taken from boat stock, with equivalent items making up any shortfall of the item itself. The stock is taken from locations on the boat, never from one away from it.

## Not counted, and why it matters {#not-counted}

An item is **counted** once any stock entry has ever been recorded for it: a count, a receipt, a use. Until then it is **Not counted**.

- **Not counted is not zero.** "0 on boat" for an item nobody has counted would be a guess, so the app shows "Not counted yet" instead.
- **Counting zero is still a count.** Count an empty locker as 0 and the item is confirmed as none aboard.
- **For working out needs, an uncounted item counts as none aboard.** A kit or a job that needs it reports it as missing, with "(stock not counted)".
- **An uncounted item is never put on the shopping list.** It goes to **Count these first** on To buy instead, because any amount to buy would be a guess.
- **Equivalents share the answer.** If any item in a group of equivalents has been counted, the group is counted.

## Expiry {#expiry}

An expiry date is given when stock is received, and belongs to that batch. Using stock takes the batch that expires first.

| What you see | When |
|---|---|
| **Expired** pill | Some of the item's stock has passed its expiry day |
| **Expires soon** pill | Some of it expires within 60 days |
| **Expiring** filter on the Items tab | Either of the above |
| A row on Today | Expired stock (Do first), or stock expiring within 60 days (Soon) |

Expired stock on the boat is not counted as usable for jobs and kits, so it can put the item back on the shopping list. Throw it out with **Used**, choosing **Discarded**.

## Undo, and who made an entry {#undo}

A stock entry is never edited or deleted. A wrong one is undone.

- **Undo** is in each Stock history row's More menu. It adds a reversing entry; the original stays in the history marked **Undone**, and the reversing entry is not listed.
- **Undoing a move** undoes both its entries.
- **Undoing a receipt** also archives its purchase expense. An order it closed is not reopened: if the stock is still coming, mark it **Ordered** again.
- **An undo cannot be undone.** Record the stock again instead.
- **Undo is refused when the stock is gone.** If what was received has since been used, the app says how many are left and asks you to count instead.
- **An entry an assistant made** says "by <assistant's name>" in the history. Your own entries say nothing.

## The four tabs {#tabs}

Inventory has four tabs, always in this order, each with a count when above 0.

| Tab | What is there |
|---|---|
| **Items** | Every active item. Search, the Low stock, Not counted and Expiring filters, and **Group by**: Category, or Location. By Location, an item appears under every location it has stock in, followed by Unassigned and Not in stock; each location's heading opens its page. |
| **To buy** | What to count first, the shopping list, and what you are not buying yet |
| **On order** | One row per order not yet received, oldest first |
| **Kits** | Kits in use first, then the ones done |

The number on To buy is also the badge on Inventory in the navigation: the shopping list plus the items to count first.

## To buy {#to-buy}

To buy is worked out, never typed. An item is on it when the record says it will be short.

| What counts | Rule |
|---|---|
| Demand from jobs | The items needed by each open job that is overdue, due within 30 days, or due within 10 engine hours. A deferred job's items do not count. |
| Demand from kits | The items of each kit in use whose needed-by date is within 30 days, or that has no date (a standing kit) |
| Minimum | The item's Keep at least |
| On the boat | Stock at locations on the boat, less expired stock, with equivalent items added in |
| On order | Every order on the item and its equivalents |
| To buy | Demand + minimum − on the boat − on order, when above 0 |

The page has three parts, each shown only when it has rows.

- **Count these first** comes first. Each row is an item that would be on the list but has never been counted, with "up to N needed if none are aboard" and a **Count** button.
- **The shopping list** comes next. Each row says how many to buy, the estimated cost, what is on the boat and on order, and which jobs and kits need it. **Ordered** is the row's button; **Received**, Edit and **Buy later…** are in More. **Copy list** copies the list as text, with the estimated total.
- **Not buying yet** is closed by default. It lists the items you put off with Buy later, with how many would be needed and the month they come back. **Bring back** puts one on the list now.

**Buy later…** keeps an item off the shopping list, and off Today, until the month you choose. The earliest choice is next month. Stock, kits and jobs that use the item are unchanged.

An item whose orders cover what is needed leaves the shopping list and is only on On order. One that is partly covered stays, worded "Buy 3 more".

## Orders {#orders}

An **order** is a note on the item that some are on their way. Orders are a list on the item; one item can have up to 50.

- **Ordered** adds an order: how many, and optionally the shop, the price each and an order number. The shop also fills the item's Where to buy when that is empty. The order counts against what you still need to buy straight away.
- **On order** lists each order as a row, with when it was ordered ("ordered 23 days ago"). The item's page has an On order section with the same orders.
- **Received** on an order opens Received with that order's quantity and price filled in. Saving takes what arrived off the order; the order is gone once all of it has come. Received on an item with several orders asks **From order**, with "Not from an order" as a choice.
- **Not ordered** removes an order after asking. The item goes back on the shopping list if it is still needed.

## Kits {#kits}

A **kit** is a list of items to have aboard for something: a trip, a project, or standing spares you always want. It says what is missing.

- **For a trip or a project**, a kit is linked to it and can have a needed-by date. A trip's Prepare section has **New kit**, which fills in the trip and its planned day.
- **A standing kit** has no date. It counts all the time.
- **What is missing** is worked out like a job's needs. Stock on the boat is shared out in date order between the jobs and kits that need it, so a kit needed later does not count items an earlier job will use.
- **A dated kit missing items** is on Today from 30 days before its date, and in Do first from 14 days before.
- **Done** marks a kit finished, after asking. A finished kit stops counting its items as reserved and leaves the shopping list's demand. It stays on the Kits tab, marked Done. The app has no action to put it back in use (as of 2026-10-11); Duplicate it instead.
- **Duplicate** makes "Copy of <name>" with the same items and project, for no trip and no date.

A kit's page shows each item with what is needed, what is on board, and "Missing 2 · 1 on order" while the kit is in use.

## Inventory elsewhere in the app {#elsewhere}

| Where | What it shows |
|---|---|
| Today | **Items to buy** and **Items to count** (both Soon, both open To buy); a dated kit missing items; expired or expiring stock |
| An equipment page | **Items that fit**, with where each is stowed ("2 in Engine room") or "Stock not counted yet" |
| A job page | **Items needed**, with where each is and "Missing N". A job under a plan takes its items from the plan; edit them there. |

## Limits {#limits}

| Limit | Value |
|---|---|
| Orders on one item | 50 |
| Shop, order number on an order | 200 characters each |
| Expiring soon | Within 60 days |
| A kit in Do first on Today | Needed within 14 days and missing items |
| Stock history on an item's page | The 25 newest entries |
| Buy later | From next month |

## What you see, and what to do {#troubleshoot}

| What you see | What it means | What to do |
|---|---|---|
| "Not counted yet" | No stock has ever been recorded for the item | Count it, even if the answer is 0 |
| An item is in Count these first, not on the shopping list | It is needed but nobody has counted it | Count it; if it is short it moves to the list |
| An item you have at home is on the shopping list | Stock away from the boat does not count as aboard | Move it to a location on the boat |
| "Not enough <item> at that location." | The use or move takes more than is recorded there | Count the location first, or choose another |
| "The unit is fixed once stock has been recorded." | Counted in cannot change after the first stock entry | Add a new item in the other unit and archive this one |
| "Only 0 left in Anchor locker, so this cannot be undone. Count it instead." | The stock has been used since | Count the location |
| "Move the stock out of this location before archiving it." | The location still holds stock | Move or count it out first |
| A receipt was recorded twice | Two entries for one delivery | Undo one of them; its expense is archived with it |

## For assistants {#for-assistants}

If you are an assistant connected to LazyJack, these are the rules for stock.

1. **Match before you create.** `inventory_item_match` by name and part number finds the item, its version, its shop and its orders; `search` finds it by any word. Create an item only when nothing matches, and read the `warnings` a create answers with to the owner.
2. **Stock is recorded, never noted.** A delivery, a use or a count goes through `inventory_stock_record` or `inventory_stock_count`; writing "3 impellers in the locker" in a note records nothing. Counting zero is a count: it confirms none aboard.
3. **One `requestKey` per receipt line** ("<shop>-<order number>-<line>-received"), so a retried call records nothing twice. A receipt the server thinks it has seen within 48 hours, or an `orderId` that was not on the item, answers with `warnings`: read them to the owner before going on.
4. **A delivery against an order carries its `orderId`**, so the order is closed or reduced by the same call; an order confirmation is `inventory_order_add`, never a receipt, and never an expense.
5. **A price is in the boat's currency**, as charged, VAT included. Shipping and fees are not an item.
6. **Undo needs approval.** `inventory_movement_reverse` is destructive: ask the owner, expect the approval step, and never undo to "tidy up".
7. **Read before you advise.** `shopping_list_get` is the owner's list; its Count these first rows are items nobody has counted, and a quantity you suggest for them would be a guess. Say "not counted" rather than "none aboard".

## Not in this chapter {#not-here}

What the words mean and how Archive, Delete and sync behave: [How LazyJack thinks](how-it-thinks.html). What an assistant may do with your inventory: [Assistants](assistants.html). Jobs, plans and Did the job: [Work: plans, jobs and problems](work.html). How items needed by plans and kits are priced into the months ahead, and expenses: [Budget and projects](budget.html). Preparing a trip: [A trip: before, during and after](a-trip.html). Receipts and photos as documents: [Documents and papers](documents.html). Setting up the boat: [Setting up the boat and engine](setting-up.html). Saving a copy: [Backup, restore and moving devices](backup.html). A stock change stuck in Sync problems: [Troubleshooting sync](sync-troubleshooting.html).
