Inventory
Most products on SmartPart are configured and made to order: nothing is built until someone orders it, and what runs out is what they are made of - board, legs, cheese, boxes. The stock register keeps those, and orders draw on them by themselves. A product can also be sold from stock, off the shelf, where 20 in the register means nobody can order 21.
This page walks through it with one example throughout: a workshop that makes tables from oak board and table legs.
Who can do what
| Role | What they can do |
|---|---|
| Administrator, Fulfilment | Everything on the Stock pages - add items, receive, adjust, count, edit details - and the Stock panel on an order. |
| Editor, Creator | Decide how a product is sold, and give it a parts formula and a maximum per order. |
| Supplier, Customer | Nothing in the register. A customer sees In stock, allow N extra days, Only N left or Out of stock, and never a SKU. |
The register is under Menu → Orders → Stock.
Adding an item
A stock item is something you keep and use up. Click New item on the Stock page and fill it in:
| Field | What it is for |
|---|---|
| SKU | The item's code, e.g. OAK-25. Upper-cased as you type, and fixed once saved - product formulas name items by it. Letters, digits, . _ -. |
| Name | What people call it: Oak board 25mm. |
| Unit | each, m, m², m³, kg or litre. Fixed once any stock has moved - 12 kg does not become 12 each by renaming the unit. |
| Opening stock | What is on the shelf today. Recorded as the item's first count. |
| Reorder point | When what is available falls to this, the item is flagged Low. |
| Reorder quantity | How much you usually order. |
| Restock days | How long a delivery takes. Customers are quoted this when an order needs more than you have. |
| Supplier, Supplier's code | Who you buy it from, and their code for it. |
| Unit cost | Rand per unit, excluding VAT. |
| Location | Shelf, bin or store - wherever someone goes to find it. |
Reading an item
The four figures at the top of an item's page:
| Figure | Meaning |
|---|---|
| On hand | Physically on the shelf. |
| Reserved | Held for orders that have not started yet. |
| Available | On hand less reserved. The number that matters for selling and for reordering. |
| Reorder at | The reorder point, with the usual order quantity and restock days. |
Below them is Movements: every change, numbered, with the balance it left, what it did to reserved, the reference or note, the order that caused it if any, and who made it.
Movements are never edited or deleted. A mistake is corrected with another movement, so the history always shows what happened and who put it right.
Day-to-day stock work
Three buttons on the item's page cover everything done by hand.
| Button | Use it when | What you enter |
|---|---|---|
| Receive | A delivery arrived. | The quantity, and optionally the unit cost and the delivery note or invoice number. |
| Adjust | Something changed that is not a delivery - breakage, a return, a write-off. | A signed change, such as -2.5, and a reason (required). Stock cannot be adjusted below zero; if the figure is that far out, count instead. |
| Count | You have counted the shelf. | What is there. The difference from the records is shown as you type, and recorded - a count that matches is still worth recording. |
The Details card at the bottom holds the item's settings. History shows who changed which setting, and when. Archive retires an item you no longer use: it keeps its history, but takes no movements until it is made active again.
Made to order, or sold from stock
The Stock card of the product editor starts with how the product is sold:
| Choice | What it means | Good for |
|---|---|---|
| Made to order (the default) | Built when an order comes in. Stock never limits how many can be ordered. | Anything cut, configured or assembled to suit. |
| Sold from stock | Comes off a shelf. Customers cannot order more than is available. | Finished goods you keep, spares, bought-in items. |
To sell something from stock:
- On the Stock page, click New item, and enter what is on the shelf as
Opening stock:
BRACKET-A, opening stock 20. - In the product's Stock card, choose Sold from stock and pick it under Stock item. Each one sold takes one.
Receiving, counting and reordering then work as they do for any other item, and the customer sees what the register says:
| Available | What the customer sees |
|---|---|
| As many as one order can take, or more | In stock. The quantity goes up to the order's limit. |
| Fewer, say 3 | Only 3 left, and the quantity stops at 3. |
| None | Out of stock in this configuration, with Add to cart withdrawn. |
If each configuration has its own shelf - shirts by size - write the parts formula
instead, and have it name the item: return [{ sku: 'SHIRT-' + gui.size, qty: 1 }];.
A formula that takes several items sells as many as the scarcest one allows.
A product sold from stock whose item is archived, whose SKU is not in the register, or whose formula fails shows Out of stock rather than selling without limit. It cannot be saved with no stock item at all.
Stock is checked when checkout opens and again when payment starts, but it is only held once the order is placed, so two people paying at the same moment can both get through. Both orders stand, because both have paid. The later one shows Sold more than was in stock in its Stock panel: contact that customer, to wait or be refunded.
Maximum per order
Maximum per order, in the same card, limits how many of a product one order can take, however it is sold. It counts every configuration together: with a maximum of 10, five red and five blue fill it. Customers see Maximum 10 per order, the quantity stops there, and checkout refuses more.
Left empty, each cart line can hold up to 20, as a guard against typing mistakes. The maximum can also be higher than 20, for something sold by the hundred.
Connecting a product to stock
A product draws on stock through its parts formula, in the Stock card of
the product editor. The formula says what one unit takes, as configured, and
returns a list of SKUs and quantities. For a table with width and depth
controls in millimetres:
var area = gui.width * gui.depth / 1000000; // mm² to m²
return [
{ sku: 'OAK-25', qty: area },
{ sku: 'LEG', qty: 4 },
];
A product that uses no stock has no parts formula.
For a product made to order, When materials are short decides what a customer is told when the register cannot cover their configuration:
| Setting | What the customer sees |
|---|---|
| Take the order, quote a longer lead time (the default) | They can buy it, and are told Materials on order: allow about 7 extra days - the slowest short item's restock days. |
| Say nothing | Nothing. Stock is still reserved and used behind the scenes. |
Before saving, type a configuration into Try with - width=1800&depth=900 -
and press Try it. Each part is listed with the stock item it names and what
is available. A SKU marked Not in the stock register is a typo or a missing
item: fix it now, or every order for the product will report it as a problem.
What an order does to stock
Nothing here is done by hand: stock follows the order's fulfilment state.
🖱️ Ctrl/⌘ + scroll or pinch to zoom · drag to pan · double-click to reset
| When the order is... | Stock | For one table taking 1.62 m² of oak |
|---|---|---|
| Placed | Reserved | Reserved +1.62, available -1.62. On hand does not change. |
| In manufacture, or any later state | Used | On hand -1.62 and reserved -1.62. |
| Cancelled before manufacture | Released | Reserved -1.62: available again. |
| Cancelled after manufacture started | Nothing | The wood is cut. If it really goes back on the shelf, record it with Receive or Adjust. |
| On hold | Nothing | Stays reserved. |
Each of these appears in the item's movements as Reserved, Used or Released, linked to the order. The order's own page has a Stock panel: what it reserved, where that stands, and a Not reserved list of anything that could not be - a SKU the register does not have, an archived item, a formula that failed.
A customer who has paid always gets their order, even if the last of something went in the meantime. If an order uses stock the records say is not there, on hand goes below zero - the signal to count that item.
What customers see
- On the product page, under the price, for the configuration on screen: In stock, Materials on order: allow about N extra days, or - for a product sold from stock - Only N left or Out of stock in this configuration. The quantity stops at what can be ordered, and Add to cart is withdrawn when that is none.
- On the cart: a line that holds more than can be ordered is named, with how many can be, and its quantity stops there.
- At checkout, when the cart is priced: a line that cannot be covered is refused before any payment is asked for, and named. Lines that will take longer are listed under Some items will take longer.
A customer never sees a SKU or a supplier, and sees a quantity only for a product sold from stock, when there is less than one order could take.
Staying on top of it
- Needs attention, the second tab on the Stock page, lists every item that is Out (nothing available) or Low (at or below its reorder point).
- The reorder email, each morning at 07:00, sends the orders mailbox the
items that have newly run low, grouped by supplier, with the usual order
quantity and the supplier's code. Each item is listed once, and again only
after it has been back above its reorder point. Ordering is still a person's
decision. It runs only where scheduled tasks are switched on
(
SCHEDULED_TASKS_ENABLED=true) and an orders mailbox is set.
Putting mistakes right
| Situation | What to do |
|---|---|
| A delivery was received with the wrong quantity | Adjust by the difference, giving the reason - correcting DN 4471. |
| The shelf and the records disagree | Count. |
| On hand is below zero | Count: something was used that was never booked in. |
| Wrong reorder point, supplier or cost | Change it under Details. It is in the item's History. |
| Wrong SKU or unit | These cannot change. Archive the item, add a new one, and update the product's parts formula. |
| An order shows Not reserved | Add the missing item, or correct the SKU in the parts formula. That order does not reserve again by itself - adjust stock by hand if it needs to. |