Skip to content

Inventory Module

The Inventory module manages warehouses, stock receipts (goods received), stock issues (goods dispatched), inter-warehouse transfers, and real-time stock balances with weighted-average costing. It provides a complete audit trail of every stock movement.

Purpose

  • Define hierarchical Warehouses with branch and manager assignment
  • Record Stock Receipts (GRN) to increase inventory on goods received
  • Record Stock Issues (GDN) to decrease inventory on goods dispatched
  • Transfer stock between warehouses via Inter-Warehouse Transfers with ship/receive workflow
  • Maintain real-time Stock Balances per product, variant, and warehouse
  • Track every stock change via Stock Movements for full auditability
  • Support batch tracking and expiry dates on receipt items
  • Calculate weighted-average cost automatically on receipts and issues

Approval Workflow

Both receipts and issues follow a three-state lifecycle:

Draft  →  Approved  →  Cancelled
  • Draft — can be edited or deleted freely.
  • Approved — stock balances are updated; the document becomes read-only.
  • Cancelled — stock changes are reversed; the document becomes read-only.

Only approval triggers stock balance changes. Drafts have no effect on inventory.

Sub-Features

FeatureDescriptionLink
WarehousesHierarchical warehouse managementwarehouses
Stock ReceiptsGoods received notes (GRN)receipts
Stock IssuesGoods dispatch notes (GDN)issues
TransfersInter-warehouse stock transferstransfers
Stock Balances & Stock CardCurrent stock levels and movement historystock-balances
Counts & AdjustmentsPhysical inventory counts and stock adjustmentscounts-adjustments
Costing EngineWAC & FIFO costing, cost layers, inventory valuationcosting

Entity Relationship Overview

API Base Path

All Inventory module endpoints are prefixed with:

/api/inventory/

Authentication is required via a Sanctum bearer token on every request. See Authentication for details.

Localization

Every request can include an Accept-Language header set to ar or en to control which language is returned for bilingual fields (name, description). When set to ar, the API returns the Arabic value; otherwise it falls back to English.

Accept-Language: ar

Monetary Precision

All cost and value fields use decimal(15, 3) to support the Kuwaiti Dinar (KWD), which requires 3 decimal places.

Moon ERP API Documentation