Opening Inventory Import

← Hub

Upload Opening Inventory Spreadsheet

Upload an inventory snapshot. Expected columns (any subset, flexible mapping): Item # / stockid, Item Desc, Warehouse, Inventory Qty, Inventory Cost (per-unit), optional Case Pack (units per case).

No warehouse column? You'll be able to pick a single GENUS location from a dropdown on the next step and apply it to every row in one click.

What gets created in the database when I commit?

Per upload (idempotent — these are created once per company, not per file):

  • suppliers — single INTERNAL supplier (only if missing).
  • purchorders — one OPENING-STOCK purchase order (only if missing). Subsequent uploads reuse it.
  • imports — a fresh import row tagged to the INTERNAL supplier each time the commit runs.

Per inventory row (in this order):

  1. purchorderdetails — one row per inventory line, against the OPENING-STOCK PO.
  2. masterpacks — one row per full case plus one row for any remainder, when Case Pack is provided; otherwise one carton per row. loccode is the destination warehouse.
  3. innerpacks — one row per masterpack, linking (masterpackid, podetailitem, stockid) with packcount + cartoncount.
  4. locstockupsert aggregated qty per (loccode, stockid). Multiple rows for the same SKU/warehouse sum first.
  5. stockmoves — one row, type=50 (Opening Balance), transno=1, reference='OPENING-STOCK'.
  6. stockmovecosts — one row, costingmethod='actual', links the stockmove to the source purchorderdetails.
  7. itemcosttracking — created lazily per SKU if it doesn't already exist (costtypeid=1).
  8. itemcosts — one row per masterpack (so 1 or 2 per inventory line depending on case pack), closedestimate=1.

If you tick auto-create-locations or auto-create-skus during review, the tool also writes:

  • locations — new stubs for unmatched warehouse names.
  • stockmaster — new stubs (discontinued=1) for unmatched SKUs; stockid is the description sanitized to uppercase alphanumeric only.

If you map all rows to a single default warehouse (the dropdown on Step 2), all the per-row rows above use that loccode.

What's NOT touched: debtortrans, supptrans, gltrans, chartdetails, custallocns, salesorders. Opening inventory is purely a stock-side operation; no GL postings are created (run the COA / opening-balance flows separately for GL).