# Stock movements and the ledger

Quantity on hand is the sum of the item's ledger. Nobody types a quantity
in; every change is a movement with a date, who recorded it and why.

## Four kinds of movement

- **Receive**: stock in, with the unit cost paid and a PO or invoice
  reference, or [free](#free-comp-receipts) with a stated value.
- **Issue**: stock out (used, given away, thrown out).
- **Sell**: stock out for money, with the unit price and an optional buyer.
  Only when the inventory is [for resale](/docs/getting-started#for-resale-or-not).
- **Adjust**: enter the counted quantity; the difference is recorded.

On the form, four boxes sit on one line: **When**, **Quantity**,
**Reference** and **Note**. Clicking the When box opens a calendar with the
time below it in quarter hours, and you can keep typing in the box while
it is open (for example `11/14/2026 9:07 am`); press Enter or move on to
apply it. Every date box in Sobocoo works the same way. Unit cost
(receive) and unit price (sale) appear below.

## Free (comp) receipts

Free samples, promo stock and donated items arrive without an order. Tick
**Free (comp)** on a receive: the units go into stock at no cost, and a
**Value per unit** box replaces Unit cost, starting at the item's cost.
Change it to what the units are worth. Say where they came from in **Note**,
for example "Sample from Acme rep".

A comp receipt raises quantity on hand but adds nothing to what you spent,
and the item's unit cost does not change. The ledger marks it with a
**Comp** badge and shows "$0.00 (worth $X)". The
[in / out report](/docs/reports#inventory) counts comp units in Received and
shows their units and value in their own columns. Free units that come with
a [purchase order](/docs/ordering) are recorded on the order and show the
same way.

## Stock counts

**Inventory → Count** lists every item at the site with a **Counted** box,
for a full or partial stock take. Set **Counted at** (date and time, in
15-minute steps) and any **Notes** once for the whole count. Press **Scan
with camera** and point it at a barcode or Sobocoo QR, or use a hardware
scanner in the **Scan** box: the page jumps to that item and puts the
cursor in its Counted box. Type the count and press Enter to scan the
next one.

Items left blank are not counted. **Save count** sets each counted item's
quantity on hand to what you counted; a difference is recorded as an
adjust movement dated the count time and noted `Stock count #<number>`.
The saved count shows what was expected, what was counted and the
difference for every item, with your notes; recent counts are listed under
the count screen.

## Below zero

Issue and sell refuse to go below zero. An administrator can tick *Allow
stock to go below zero* when the count is known to be wrong, then adjust.

## Corrections

The account holder and administrators can fix a movement that was entered
wrong: **Edit** beside it on the item page or the ledger. Change the
quantity, the date and time, the unit cost or price, the reference or the
note, or delete the movement. A comp receipt stays free: its edit form has
Value per unit instead of Unit cost. Quantity on hand moves by the difference (it
can go below zero), and the [audit trail](/docs/audit-trail) keeps every
edit and deletion with the values before and after.

Movements that came from a [purchase order](/docs/ordering) delivery, an
order list receive or a [CSV import](/docs/import) only take a new date and
note, and cannot be deleted: correct the quantities on the order instead.

Members cannot edit movements. They record a correction as usual: an adjust
to the counted quantity, or the opposite movement.

## The ledger page

Each item's **Ledger** lists its movements newest first, 25 to a page, for a
date range (the same presets and From / To as the [reports](/docs/reports),
default last 3 months). Above the table a chart draws quantity on hand across
the whole range: it starts at the balance on the first day and steps at every
movement in the range, whatever page the table is on. Hover (or tap on a
phone) for the balance at any moment; a dashed line marks the item's reorder
point when one is set.

Every item page shows the same chart for the last 90 days, with a **Ledger &
chart** link to this page; the item list links it too (the chart icon at the
end of each row).

Faster ways to record movements: [scanning](/docs/scanning) and
[receiving purchase orders](/docs/ordering).
