← All documentation · Inventory & Purchasing
Stock History and adjusting stock
Stock History is LogAI's stock ledger: every change to a product's or variant's stock — sales, returns, cancellations, purchase receipts, transfers and manual adjustments — recorded with the reason, the document behind it and who did it. Learn to read and export it, use a product's Stock tab, and adjust stock with a reason.
8 min read · Last updated
Catalog → Stock History answers “why is this number what it is?”. Every time a product's or variant's stock goes up or down — an invoice line, a storefront or Point of Sale order, a cancellation, a customer return, a purchase receipt, a move between locations, or someone fixing the count by hand — LogAI writes one row to the ledger: what moved, by how much, the balance before and after, the reason, the document it came from and the person who did it.
The ledger and the stock figure can't disagree: The change to the stock figure and its ledger row are saved together, in one step — if one fails, neither happens. Rows are never edited or deleted; a mistake is fixed with a new movement, so the history always adds up. Products that already held stock when the ledger started got an Opening row (“Stock on hand when stock history began”), so running balances reconcile from day one.
Where to find it
- Catalog → Stock History — the whole organization's ledger. It sits under Catalog, after Categories.
- A product's Stock tab — open any product in Catalog → Products and switch to
Stockfor that item's own history. Clicking a row in Stock History opens the product straight on this tab. Adjust stock— on Stock History's toolbar, in a product's header actions, as an icon on each products-table row and in its row menu, and as the small button besideCurrent Stockin the product drawer (“Adjust with a reason”).
Read the ledger
Four tiles head the page for the chosen period: Stock in (received, returned and corrected up), Stock out (sold, written off and corrected down), Net change with the number of movements, and Manual changes (corrections, write-offs and direct edits). Click Stock in or Stock out to show only that direction; click Manual changes to jump to the Manual tab. On a phone the table becomes a list of cards.
| Column | What it shows |
|---|---|
| When | Date and time, with how long ago. Sortable. |
| Item | Product name, variant and SKU, with a green arrow for stock in and a red one for stock out. A product deleted since is shown struck through. |
| Change | The signed quantity, e.g. +12 or −3. Sortable. |
| Balance | The balance before → after. With several locations it's that location's own count (“at Pune”); hover for the organization-wide total. |
| Reason | Why it moved — see the table below. |
| Location | Only when you have more than one location: where it happened. A transfer also names the other end, e.g. Main → Pune. |
| Reference | The invoice, order, return or purchase receipt number. Click it to open that document; transfers show “To …” / “From …”. |
| By | The team member who did it. Storefront orders with no team member show Storefront; automatic changes with no person behind them show System. |
| Note | The note typed in, or the one LogAI adds (for example “Order line: Plain Tee”). Hover to read a long one. |
Reasons
| Reason | Meaning | Comes from |
|---|---|---|
| Opening | The balance an item started with. | Creating a product or a new variant with stock; the starting balance when the ledger began. |
| Received | Goods received into stock. | Adjust stock → Add. |
| Delivered | Goods received on a purchase receipt. | Receiving goods in Catalog → Purchases. |
| Sold | Taken by an invoice line or an order. | Invoices, Point of Sale and storefront orders, or Adjust stock → Remove. |
| Sale reversed | Given back when a line, invoice or order was removed, changed or cancelled. | Deleting an invoice or a line, lowering a quantity, cancelling an order, moving an order to another location. |
| Returned | A customer return put back on the shelf. | A return marked Received / Refunded / Exchanged with restocking on, Restore stock after an RTO parcel, or Adjust stock → Add. |
| Damaged | Written off — damaged, lost or expired. | Adjust stock → Remove. |
| Correction | A stock count correction. | Adjust stock (Add, Remove or Set count). |
| Edited | The stock field was changed directly, without a reason. | Editing Current Stock on the product (form or inline in the table) or in variant settings. |
| Moved out / Moved in | The two halves of a move between locations. | Move stock — see Locations. |
Filter, search and export
- Tabs slice by reason, each with its count:
All,Sales(Sold and Sale reversed),Returns,Received(Received and Delivered),Transfers(only with more than one location),Manual(Correction, Damaged and Edited) andOpening. - Period —
Today,7 days,30 days(the default),90 daysorAll time. - Location — with several locations,
All locationsor one branch or warehouse. - Search matches the item name, SKU, variant, reference number and note.
- Active filters show as chips you can remove one by one, or reset all at once.
Exportdownloads a CSV of every movement matching the current filters — Date, Product, Variant, SKU, Reason, Direction, Change, Before, After, Location, Other Location, Reference Type, Reference, Note and By. The button appears once there's at least one row.
A product's Stock tab
Open a product and choose Stock. The top card shows what's On hand — for a variable product pick All variants or one variant from the chips — with In, Out and Moves for the last 30 days. With several locations, chips switch the figure and the list between All locations and each branch, and the organization-wide total stays visible underneath. Adjust and (with several locations) Move act on the item and location in view.
Below, Stock history lists the item's latest movements, 20 at a time — Show more loads up to 100, and Open ledger (or “View all … in the ledger”) opens Stock History filtered to this item for all time. Digital products and services show “No stock to track” instead.
Adjust stock
- Open the dialog. Click
Adjust stockon Stock History (you search for the product), or from a product, its table row or its Stock tab (the item is already chosen). For a variable product, pick the variant — stock is held per variant. With several locations, pick the location; it starts on your own (“Where you work” in Locations) and each chip shows the units there. - Choose the change.
Addfor stock coming in,Removefor stock going out, orSet countto make the number you type the new balance. Type theQuantity(or theNew count) or use − and +; decimals are allowed. The preview shows the balance before and after. - Pick a reason. Add offers Received, Returned and Correction; Remove offers Sold, Damaged and Correction; Set count is always a Correction.
- Add a note and save. The
Noteis optional — a PO number, who counted, what happened. The button reads what will happen (Add 5,Remove 2,Set to 40). The new balance appears straight away and the movement is in the ledger with your name on it.
Prefer Adjust stock over editing the number: Typing a new figure into Current Stock still works, but the ledger can only call it Edited. Adjust stock records why — Received, Damaged, Correction — which is what makes the history useful later. For goods bought from a supplier, receiving them in Purchases also records what you paid.
What changes stock automatically
| When this happens | Ledger row | Reference |
|---|---|---|
| A line is saved on an invoice | Sold | Invoice number |
| An invoice line's quantity or item changes | Sold or Sale reversed for the difference | Invoice number |
| An invoice line, or the whole invoice, is deleted | Sale reversed | Invoice number |
| A Point of Sale order is created | Sold | Order number |
| A storefront order is paid online (Processed), or placed as Cash on Delivery | Sold — shown as by Storefront | Order number |
| An order's lines are edited | Sale reversed, then Sold for the new lines | Order number |
| An order is cancelled — by you, or by the customer while it's still allowed | Sale reversed | Order number |
| The courier cancels a shipment that was Shipped or Out for delivery | Sale reversed (“Courier cancelled the shipment”) | Order number |
Restore stock on a returned-to-origin (RTO) parcel | Returned (“RTO parcel back in stock”) | Order number |
A return with Restock items on is marked Received, Refunded or Exchanged | Returned, once per return | Return number |
| Goods are received in Purchases | Delivered | Receipt number |
| Stock is moved between locations | Moved out + Moved in | To … / From … |
| A product or variant is created with stock | Opening | — |
Cancelling an invoice doesn't put stock back: Deleting an invoice (or one of its lines) returns its stock, but cancelling it does not. If the goods are back on your shelf after a cancelled invoice, record it with Adjust stock → Add (Returned or Correction).
What's never allowed
- Stock never goes below zero. A sale, removal or move that needs more than is on hand is refused — “Not enough stock for '…': 3 available, 5 requested.” With several locations the same applies to each location (“… at Pune: 3 available there …”), even if the organization as a whole has enough.
- Digital products and services don't track stock — they never appear in the ledger and can't be adjusted.
- Variable products are adjusted per variant, never at product level.
- Set count can't be negative, and setting the count it already has is refused as no change. Stock can't exceed 999,999,999,999 units.
- Nothing in the ledger can be edited or deleted — correct a mistake with another adjustment.
Who can do what
Stock History follows the Products permission in roles: View on Products shows the menu item, the ledger, the product Stock tab and Export; Update on Products is needed to Adjust stock (and to Move stock between locations). Location chips and per-location counts also need View on Locations (see Locations).
Frequently asked questions
Why did my stock change when nobody adjusted it?
Open Catalog → Stock History, search the product (or open it and go to its Stock tab) and look at the Reason and Reference columns. Invoices, Point of Sale and storefront orders, cancellations, returns, purchase receipts and moves between locations all write their own rows, with the document number and who did it.
Can I edit or delete a stock movement?
No. The ledger is append-only so the history always adds up. If a movement was wrong, record the opposite change with Adjust stock and a note explaining why.
What is the difference between Received and Delivered?
Received is a manual Add in the Adjust stock dialog. Delivered is written when goods are received against a purchase in Catalog → Purchases, which also records what you paid for them.
Why does a row say Edited instead of a reason?
Someone typed a new number into Current Stock on the product, in the products table or in variant settings. That path has no reason to record, so use Adjust stock when you want the history to say why.
Does cancelling an order give the stock back?
Yes. Cancelling an order that had taken stock writes a Sale reversed row and puts the units back at the location they were taken from (or the default location if that one has been retired since). Cancelling an invoice does not; deleting the invoice or its lines does.
Can stock go negative?
No. Any sale, removal or move that needs more than is on hand is refused with a message saying how many are available. With several locations, each location is checked on its own.
Can I export the stock ledger?
Yes. Export on Catalog → Stock History downloads a CSV of every movement matching your current tab, period, location, product and search filters.
Open the LogAI app — start free, no credit card required.