Appearance
Warehouses
| Backlog field | Value |
|---|---|
| Story ID | INV-DASH-009 |
| Epic | Inventory |
| Story type | Dashboard |
| Review status | Draft - business analyst and business owner review required |
| Source evidence | Inventory MFE route/form, Inventory.Apis controller, application command/query handlers, validators, domain entities, and posting services |
| Last source review | 2026-07-10 |
Purpose
Define stock-holding locations and their operational/accounting configuration.
User stories
- As an administrator, I want to add and edit warehouses so that stock is held in controlled locations.
- As an inventory user, I want to view a warehouse and its item balances so that I can understand what it contains.
- As an accountant, I want warehouse-related accounts configured so that movements post correctly.
- As a manager, I want to export the warehouse list or warehouse items for analysis.
Acceptance criteria
- A warehouse has a unique business identity and the required company/branch association.
- Add, edit, view, delete, list, and export actions are permission-controlled.
- Warehouse details expose configured accounts and assigned/stocked items to authorized users.
- Stock checking reports the current available quantity for the selected item/warehouse context.
- A warehouse referenced by stock or transactions cannot be deleted in a way that breaks history.
- Quick add returns the new warehouse to the initiating workflow when the user has add permission.
- Exports reflect the current filters and localization.
Required, optional, and conditional data
- Required: English name, Arabic name, and warehouse type on full edit.
- Branch assignments are optional in the command but determine where the warehouse is selectable.
- Address is optional; when email is supplied it must be valid, and when phone/country code are supplied the mobile format must be valid.
- Warehouse accounts are optional while editing master data but the Warehouse GL account becomes mandatory before any posting that affects this warehouse.
- Quick Add requires localized names; it may include branches and type, then returns the new ID to the calling page.
Accounts and downstream effects
- Warehouse GL is the inventory control account debited by Stock In and credited by Stock Out.
- Purchase, Goods in Transit, and Adjustment account fields may support other flows, but each transaction uses its explicit resolver; no undocumented fallback should be assumed.
- Changing an account affects future journals only and must not rewrite journals already linked to posted movements.
Delete/deactivate rules
Deletion must be blocked when the warehouse is referenced by stock headers, opening balances, movements, counts, reorder rules, branch setup, or source documents. Deactivation is the safe option: the warehouse disappears from new-transaction lookups while remaining on history and reports.