Miridia
Portal
Guides

Inventory

Track stock for each product at each location with an append-only movement ledger. Adjust, transfer, trace, and set reorder points.

Miridia holds stock for each product at each location. Each change to stock is a movement. Movements are never changed or deleted. The list of movements is the ledger, and the ledger is the audit record of your stock.

The inventory record

Each product at each location has one inventory record. The record holds:

  • On hand: the stock that is physically at the location.
  • Reserved: the stock that is promised to an order.
  • In transit: the stock that is on the way to the location from another location.
  • The costing method: WeightedAverage or Fifo.
  • The average cost and the last purchase cost.
  • The reorder point, the reorder quantity, and the safety stock.

To see the stock of one product at all locations, get the inventory by product. To see all products at one location, get the inventory by location.

Movements

Each movement records:

  • the movement type
  • the quantity
  • the running balance after the movement
  • the source document, for example a purchase order or a work order
  • the effective date
  • a note

The movement types are:

TypeCause
PurchaseA purchase order receipt.
SaleA sale to a customer.
TransferOutStock leaves a location on a transfer.
TransferInStock arrives at a location on a transfer.
AdjustmentA manual correction or a stock take.
AssemblyConsumptionA work order uses a component.
AssemblyProductionA work order produces a finished good.
ReturnA customer returns stock.
WriteOffStock is damaged, expired, or lost.
To correct an error, add a new movement with a note. Do not try to remove the incorrect movement. Both the error and the correction stay visible. This is the property that an auditor for FSSC 22000, HACCP, or ISO needs.

Costing

Miridia keeps the weighted average cost up to date from the ledger. Each receipt at a different price changes the average. A work order that uses a component then uses what the component really cost, not a list price.

The cost history endpoint gives the history of the average cost for a product.

Adjust stock

Use an adjustment for a stock take, a breakage, or a write-off. An adjustment needs a product, a location, a quantity, and a movement type. Always add a note that gives the reason.

POST /api/v1/inventory/adjust
{
  "productId": "5b0c7a3e-1f0d-4a8e-9c2b-2f2d1c9e7a11",
  "locationId": "0f6c1b52-8d7e-4c0a-b3a9-6a1e5d2c4b77",
  "quantity": -3,
  "movementType": "WriteOff",
  "notes": "Three tubs damaged in the freezer"
}

Move stock in one step

For a quick move between two locations, use the one-step transfer. It writes a TransferOut at the source and a TransferIn at the destination in one operation.

For a move that needs a request, an approval, or time in transit, use a transfer order.

Backdated movements

An adjustment, a transfer, and a receipt accept an effectiveDate. You can load several months of history when you start on Miridia. The average cost is then correct. The system does not assume that all stock arrived on the day of the migration.

Lots and serial numbers

A lot groups units that were made or received together. A lot has a lot number, an optional expiry date, notes, and attachments, for example a certificate of analysis.

A work order can create a lot when it completes. It can also record serial numbers for the units that it produced. A serial number has a status: Available, Consumed, Shipped, or Scrapped.

To see the movements of one lot, get the movements of the lot.

Traceability

Miridia can trace stock in two directions.

  • Forward: start from a purchase order receipt. Find the shipments that most probably took stock from that receipt, and their orders and customers. Use this for a supplier recall.
  • Backward: start from a customer shipment. Find the receipts that most probably supplied the stock, and their purchase orders and suppliers. Use this for a customer complaint.
The trace is an inference on a first-in, first-out basis. It gives the probable source. It does not prove which physical consignment went to which customer. Each response includes a disclaimer field that states this limit.

Reorder points

Set these values on each inventory record:

  • Reorder point: when the balance goes below this value, Miridia raises a low-stock event.
  • Reorder quantity: the quantity to order.
  • Safety stock: the buffer for a change in demand or a late delivery.

The source of the values is Manual or Forecast. A planner can calculate them in Miridia Planner. The reorder history shows each change to the settings.

When the stock of a product at a location goes below its reorder point, Miridia sends a warning to the business and to the users with the Manager role. Read Notifications. You can also start a workflow on the OnInventoryLowStock trigger. Read Workflows.

API reference