Table of Contents
- Introduction & System Overview
- Login, Roles & Common Page Operations
- User Management (UM) Locked
- Asset — Module Overview & Hierarchy Core
- Asset Master — Type / Category / Item / Units
- Devices, Equipment, Utilities & Hired Assets
- Asset Movement & Geo Tracking
- Maintenance & Operational Costing
- Auditing, Disposal & Value Monitor
- Asset Reports
- Purchase — Module Overview Core
- Vendor Master & Quote Invitations
- Plan → POR → Quotation → Purchase Order
- Delivery, Logistics & Stock-In
- Bills, Statements, Returns & Vouchers
- Sales / POS — Overview, Terminals & Lookups Core
- Sessions, Sales & Tendering
- POS Reports & Day-End Close
- Store — Overview & Masters Core
- Inward (GRN), Issue & Transfer
- Stock Audit, Variance & Damaged Stock
- Closing Balance & Period Close
- Store Reports
- Accounts — Chart of Accounts & Ledgers
- Journal, Petty Cash & Voucher Types
- Accounts Reports & MGS Export
- Accounts Gateway — Cross-Module Posting Bridge
- Status & Notification Reference
- Troubleshooting
- Glossary
Introduction & System Overview
Folks Inventory ERP is the side of the Folks ERP suite that owns physical goods, money flowing into and out of the warehouse, and points of sale. It runs on a single SQL-Server-backed engine and is split into seven modules — five operational and two financial — that share a common authentication and approval framework.
Every read and write goes through a named stored procedure — predictable, auditable, no LINQ in business logic.
Roles map to designations, designations to menus & sub-menus, sub-menus to page actions (View / Create / Edit / Delete / Approve).
.NET Blazor with SignalR — stock balances, POS carts, audit screens refresh in real time.
Bridges Sales/Purchase/Payments into the GL — operational events post into ledger asynchronously, no cross-module coupling.
Modules in this manual
| # | Module | Purpose | Key entities |
|---|---|---|---|
| 1 | Asset | Lifecycle of every owned/hired asset — onboarding, movement, maintenance, audit, disposal. | AssetType, AssetCategory, AssetItem, DeviceMaster, EquipmentMaster, UtilityMaster, HiredItem |
| 2 | Purchase | Procure-to-Pay — Plan, POR, Quotation, PO, Work Order, Delivery, Bills. | PurchasePlan, PurchaseOrderRequest, Quotation, PurchaseOrder, Delivery, PurchaseBills, Vendors |
| 3 | Sales / POS | Counter-side selling — terminals, sessions, multi-tender, receipts, Z-Report. | POS_Terminal, POS_Session, POS_Sale, POS_SaleLine, POS_Payment, POS_PaymentMethod |
| 4 | Store | Warehouse operations — items, inward, issue, transfer, audit, period close. | StoreMaster, StoreInventoryItem, StoreEntry, StoreExit, StoreAuditing, StockAtStore |
| 5 | Accounts | General ledger — Chart of Accounts, journal entries, petty cash, reports. | Accounts_LedgerGroup, Accounts_Ledger, Accounts_Transaction, Accounts_TransactionDetails |
| 6 | Accounts Gateway | Bridge that pushes Customer / Supplier postings from Sales / Purchase / Payments into the ledger. | AccountsGateway_Customer, AccountsGateway_Supplier, ActionItems queue |
| 7 | User Management Locked | Login, employees, departments, designations, roles, menus, workflow. | Login, Users, UserRoles, UserRolePrivileges, MainMenu, SubMenu, Workflow* |
The data flow at a glance
Login, Roles & Common Page Operations
Every user in the system has a Login, an Employee Registration profile and one or more User Roles. Roles drive what menus and actions you see — they are not just labels.
2.1 Logging in
- Open the FE URL in your browser. The Login page accepts Username and Password.
- On success, you receive a JWT and are redirected to the role's DefaultPath (set on the Login row).
- If your Login.Status is
InactiveorBlocked, the system rejects you with an admin-only resolution.
2.2 Roles you'll meet
| Role | Sees | Cannot |
|---|---|---|
| SuperAdmin | All modules & menus. | (none — full access) |
| Admin | Module-scoped admin (e.g. Store Admin). | UM master setup; cross-module approvals out of scope. |
| Storekeeper | Store inward / issue / audit. | POS, Accounts, vendor master. |
| Cashier | POS terminal & session. | Store transactions, supplier data. |
| Buyer | Plan, POR, Quotation, PO. | POS, Store inward. |
| Accountant | Chart of accounts, journals, reports. | POS sale entry, store audit. |
2.3 The page anatomy
| # | Code | Name | Status | Actions |
|---|---|---|---|---|
| 1 | AC-2026-0001 | Carrier 38KVR — OT-1 | Active | |
| 2 | AC-2026-0002 | Carrier 38KVR — OT-2 | Under Audit |
2.4 Common conventions
- Codes are auto-generated. Leave the code field empty when adding — the SP fills it in.
- IsActive flag. Most master rows have this — soft-delete preferred over physical delete.
- UserID stamping. CreatedBy, CreatedDate, ModifiedBy, ModifiedDate are filled from the JWT — not from the form.
- File attachments. Use the ImagePath / FileRepository hooks; never store binary in the main entity table.
User Management (UM)
LockedThe User Management module is shared with the BackOffice ERP and is treated as locked code — both apps consume the same Login, Employee, Role and Workflow tables. This chapter is a reference, not an instruction set.
3.1 Login & RBAC chain
3.2 Tables you may need to know
| Table | Purpose |
|---|---|
Login | UserName / Password / Status / DefaultPathID / LoginTypeID. |
EmployeeReg | Employee profile with image & designation. |
Department / Designation | Org hierarchy. |
DesignationRoles | Default roles bundled per designation. |
UserRoles | The role(s) a user holds. |
UserRolePrivileges | (UserRolesID × SubMenuID × PagePrivilegeTypes) — the actual gate. |
UserOverRideRights | Per-user exception (grant or deny). |
MainMenu / SubMenu | Navigation tree with ViewPath. |
PagePrivilegeTypes | The five action verbs allowed against any page. |
InternalWorkflow / ExternalWorkflow / WorkflowListener | The state-machine engine that powers approvals across modules. |
ActivityLog | Append-only audit trail — who did what, when. |
Asset — Module Overview & Hierarchy
CoreThe Asset module manages every physical item the organisation owns or hires. It supports four asset families — Assets, Devices, Equipment, Utilities — plus a parallel Hired hierarchy for rented items. Each family has its own master, movement and geo-tracking entities, but they share a common audit, costing and disposal model.
4.1 The four families
Most "things" — furniture, vehicles, machinery. Held by AssetType → AssetCategory → AssetItem.
Electronic / IT-class items with serial-number and geo-movement detail. DeviceMaster + DeviceType.
Heavy / specialised gear (drills, scaffolding). EquipmentMaster + EquipmentType.
Site-tied utility units (gensets, AC packs). UtilityMaster + UtilityType.
4.2 Sub-modules & what they own
| Sub-module | Pages | Notes |
|---|---|---|
| Asset Master | AssetType, AssetCategory, AssetItem, AssetItemUnitDetails | Three-level taxonomy with units (each → kg / set / pair…). |
| Audit & Lifecycle | AssetAuditing, AssetAuditStatus, AssetDispose, AssetDisposeTypes | Audits drive disposal decisions. |
| Movement & Operations | AssetOperation, GeneralAssetMovement, *MovementGeo | Per-family movement + lat/long. |
| Maintenance | AssetMaintenance, MaintenanceExpenses, MaintenanceCost | Schedule + log expenses. |
| Costing & Valuation | AssetValueMonitor, OperationalAndUsageCosting, LabourCost, FuelOrEnergyCost, ServiceCost, SpareCost | Feeds depreciation; recompute on every event. |
| Hired/Rental | HiredCategory, HiredItem, HiredOperation, HiredRentCosting, HiredRentedLeaseAgency | Parallel hierarchy for rented things. |
| Location & Contacts | LocationDetails, Contacts, ProjectSites, ProjectSiteEmployee | Where the asset lives + who's responsible. |
| Petty & Misc | PettyCashLedger, ImagePath | Field-level cash; image attachments per asset. |
4.3 The asset's life
Asset Master — Type / Category / Item / Units
The Asset Master is a three-level tree. AssetType is the broadest category (e.g. IT Hardware), AssetCategory a refinement under a Type (e.g. Laptops), and AssetItem the specific master record (e.g. HP EliteBook 840). Each Item carries one or more Unit Details — the units it can be tracked in.
5.1 The hierarchy
5.2 Adding a new Asset Type
- Open Asset → Asset Type.
- Click Add. Enter Type Name and Description. Leave Code blank — the SP
CF_MasGen_FolksERP_Asset_AssetType_Insertgenerates it. - Save. The grid refreshes.
5.3 Adding a Category under a Type
- Open Asset → Asset Category. Pick the parent Asset Type.
- Add the category. The dropdown is filtered by
AssetCategory_SelectByAssetTypeID.
5.4 Asset Item — the actual master
5.5 Unit Details
Some items are tracked in more than one unit (a paint drum is bought by litre but issued by can). Add each measurement unit on Asset Item Unit Details and mark a conversion factor back to the default unit.
| Item | Unit | Conversion to default | Default? |
|---|---|---|---|
| HP EliteBook 840 | each | 1.000 | Yes |
| Wall Paint — Apex White | litre | 1.000 | Yes |
| Wall Paint — Apex White | 5L can | 5.000 | No |
| Wall Paint — Apex White | 20L drum | 20.000 | No |
StockAtStore row for that item — get this right at master-creation time.Devices, Equipment, Utilities & Hired Assets
While the General Asset path is the most common, four parallel paths exist for things that need different metadata. They share movement and geo concepts but have their own Master entity.
6.1 Devices
Devices are typically electronic / IT items with a serial number, a geographical movement history, and a contacts list (vendor, AMC supplier). Use this when you need to know which laptop was last seen at which site, on which date.
- DeviceMaster — serial, model, ownership, current site.
- DeviceType — laptop, printer, scanner, projector…
- DeviceMovement — every check-in / check-out event.
- DeviceMovementGeoLocation — lat/long captured at each movement.
- DeviceMasterContacts — supplier and AMC contacts attached.
6.2 Equipment
Equipment covers the heavy / specialised gear that a project site uses (drills, scaffolding, generators owned by the company). Mirror structure to Devices but distinct types and movement rules.
6.3 Utilities
Utilities are site-tied service-oriented assets — gensets, AC packs, water pumps. The pages mirror Devices/Equipment but emphasise SiteID over person assigned.
6.4 Hired (Rental) Assets
For things you don't own, the Hired hierarchy lives parallel: HiredCategory → HiredItem → HiredItemUnitDetails. Hired items are tied to a HiredRentedLeaseAgency (the party renting to you) and accumulate HiredRentCosting by usage period.
| Concept | Owned | Hired |
|---|---|---|
| Master | AssetItem / DeviceMaster / EquipmentMaster / UtilityMaster | HiredItem |
| Operation log | AssetOperation / GeneralAssetMovement | HiredOperation |
| Costing | OperationalAndUsageCosting + LabourCost / FuelOrEnergyCost / ServiceCost / SpareCost | HiredRentCosting (rental period × rate) |
| Counterparty | (internal — assigned employee / site) | HiredRentedLeaseAgency |
| Disposal? | Yes — full disposal flow. | No — return to agency. |
Asset Movement & Geo Tracking
Every time an asset physically changes hands or location, you log a movement. The same family's Master + Movement + MovementGeo tables form a triplet. GeneralAssetMovement is the catch-all when the family is just Asset.
7.1 The movement event model
| Field | Meaning |
|---|---|
| FromLocation / ToLocation | Project Site or Store IDs. |
| FromEmployee / ToEmployee | Person handing over / receiving. |
| MovementDate | UTC timestamp. |
| Reason | Free text or controlled list (Transfer / Repair / Loan / Return…). |
| Status | InTransit → Received → Closed. |
| Lat / Long | Captured at receive — stored on *MovementGeoLocation. |
7.2 The flow
7.3 Reading the history
Use GeneralAssetMovement_Select with the AssetItemID to fetch the full chronological list. Each row references the geo log via the matching MovementID — join in to plot on a map.
AssetValueMonitor snapshot will fail revaluation — the SP rejects them.Maintenance & Operational Costing
Maintenance has two halves: a schedule + log half (when did we service it, by whom), and a cost half (labour, fuel, service, spares). The cost half feeds depreciation and the Asset Reports.
8.1 The maintenance schedule
- Open Asset → Asset Maintenance. Pick the AssetItem.
- Enter Scheduled Date, Type (Preventive / Corrective / Calibration), Owner.
- On completion, set the Completed Date and a Remark — this closes the maintenance row.
8.2 Cost capture
| Cost line | Table | Posted to |
|---|---|---|
| Labour | LabourCost | Maintenance + Costing roll-up |
| Fuel / Energy | FuelOrEnergyCost | Operational costing |
| Service (3rd party) | ServiceCost | Maintenance |
| Spare parts | SpareCost | Maintenance + (optional) Store issue |
| Maintenance expense (catch-all) | MaintenanceExpenses | Maintenance |
| Operational + usage | OperationalAndUsageCosting | Asset Value Monitor — reduces book value |
8.3 Why the SP path matters
Each cost insert calls a dedicated SP that also recomputes the matching AssetValueMonitor row. Bypassing the SP (e.g. raw insert) leaves valuation stale and Reports show wrong book values.
Auditing, Disposal & Value Monitor
Three closely-related sub-modules that together close the asset's life. Auditing surfaces the candidates, Value Monitor tells you what they're worth, and Disposal records the exit.
9.1 Auditing
- Open Asset → Asset Auditing. Pick the period & auditor.
- For each AssetItem, the SP
AssetAuditing_Selectshows expected location, last movement, accumulated cost, and book value. - Auditor sets the AuditStatus: OK, Flag for Review, Recommend Disposal.
9.2 Audit statuses (table)
| Status | Meaning |
|---|---|
| OK | Asset present, condition acceptable. |
| Under Audit | In progress; physical check pending. |
| Discrepancy | Physical doesn't match system — needs adjustment. |
| Recommend Disposal | Auditor has flagged for retirement. |
| Disposed | Closed via the Disposal flow. |
9.3 Value Monitor
AssetValueMonitor stores a per-period book value per asset/unit. Two SPs maintain it: AssetValueMonitor_Insert for the original cost and AssetValueMonitor_UpdateDiminiPercentage applied each period to reduce book value. Operational events (maintenance, fuel) trigger the same recompute path.
9.4 Disposal
- From Asset Auditing, choose Recommend Disposal.
- Open Asset → Asset Dispose. The candidate appears.
- Pick a Dispose Type (Sold / Scrapped / Donated / Lost). Enter buyer/agency, sale value, date.
- Save — the SP marks the asset Disposed, freezes the value monitor row, and (if Sold) creates a journal candidate for Accounts Gateway.
Asset Reports
Seven canned reports cover the main views auditors and finance ask for. All run from the Asset → Reports menu and accept the same standard filter set: From Date / To Date / Asset Type / Category / Status.
| # | Report | Answers |
|---|---|---|
| 1 | Asset Item Report | Master listing with codes, owners, current location. |
| 2 | Asset Type Report | Roll-up by AssetType — count and total value. |
| 3 | Asset Category Report | Roll-up by Category — drill into Items. |
| 4 | Auditing Report | Audit log with status & auditor for the period. |
| 5 | Operations Report | Movement & operational events log. |
| 6 | Asset Dispose Report | Disposed assets with type, date, and proceeds. |
| 7 | General Asset Movement Report | All movements across families with from/to and dates. |
Purchase — Module Overview
CoreThe Purchase module owns the Procure-to-Pay chain. Eleven sub-modules, ~42 tables, ~150 SPs and 22 Razor pages walk a request from a buyer's plan to a vendor's paid bill.
11.1 The eleven sub-modules
| Sub-module | Owns |
|---|---|
| Purchase Plan (PP) | Aggregated demand for a period — what we plan to buy. |
| Purchase Order Request (POR) | A formal, departmental ask — line items + delivery distribution. |
| Quotation & Comparison | RFQ to vendors, side-by-side compare. |
| Purchase Order (PO) | The selected vendor's order, with invoice tracking. |
| Purchase Work Order (PWO) | Internal execution doc derived from a PO. |
| Delivery | Goods receipt at the dock. |
| Logistics | Vehicle / route / driver per delivery. |
| Vendors | Supplier master with contacts, payment terms. |
| Bills & Statements | Vendor invoices and account statements. |
| Vouchers (Expense / Income) | Cost allocation and remittance. |
| Returns & Daily Reports | Goods return, adjustments, daily local-purchase log. |
11.2 The end-to-end flow
Vendor Master & Quote Invitations
Before any POR can move, you need vendors. The Vendors table holds suppliers; the InviteVendor page sends the RFQ; SubmitQuot records the response.
12.1 Adding a vendor
- Open Purchase → Purchase Dictionary → Vendor Entry.
- Enter the basics — Name, Trade Licence, VAT/TRN, Country, City, Currency, Payment Terms.
- Add Contacts (multiple) — name, role, phone, email. Mark one as Primary.
- Save. The vendor is now selectable in POR and PO screens.
12.2 Inviting vendors to quote
- Open the POR for which you need quotes.
- Click Invite Vendor. Pick 3–5 from the multi-select.
- Each chosen vendor receives an email with a link to SubmitQuot.
12.3 Submitting a quote
Vendors land on Submit Quot and key in their unit prices, delivery dates and validity. Each line maps to a POR detail line — the comparison page reads from QuoteForPurchaseOrderRequestDetails.
12.4 Comparison
| Item | Vendor A | Vendor B | Vendor C | Best |
|---|---|---|---|---|
| HP EliteBook 840 | 4,250 | 4,180 | 4,300 | B |
| Dell 24" Monitor | 650 | 675 | 620 | C |
| Logitech MX Keyboard | 180 | 175 | 190 | B |
Plan → POR → Quotation → Purchase Order
The four documents on the procurement spine. Each carries the previous one's reference and adds detail.
13.1 Purchase Plan
A periodic ask of what the organisation expects to buy — stocked items, project items, services. The Plan does not commit money; it sets a budget envelope.
13.2 Purchase Order Request
The POR is what departments raise — line items, qty, target delivery, project site, distribution.
| Field | Note |
|---|---|
| POR No / Date | Auto-generated. |
| Department / ProjectSite | Drives delivery distribution. |
| Lines (Item × Qty × Unit) | From StoreInventoryItem or asset master. |
| Delivery Distribution | Multi-row — split delivery across sites + dates. |
| Status | Draft → Submitted → Approved → Quoted → Ordered → Cancelled. |
13.3 PO statuses
13.4 Purchase Work Order
Some POs spawn an internal Work Order — typically when execution involves multiple in-house steps before goods are delivered to the requester. PurchaseWorkOrder + PurchaseWorkOrderDetails.
Delivery, Logistics & Stock-In
When goods arrive, three things happen. Delivery records the receipt. Logistics records the truck, route and driver. The matching StoreEntry in the Store module increments stock.
14.1 The receipt screen
- Open Purchase → Delivery. Pick the open PO.
- Scan or key the Received Qty per line. Mismatch with PO is highlighted in red.
- Attach the LPO / Delivery Note PDF.
- A StoreEntry is auto-created for each line — stock increments visible on the Store dashboard.
14.2 Logistics
| Field | Note |
|---|---|
| VehicleType / VehicleNo | From M_VehicleType master. |
| Driver / DriverPhone | Free-form on this delivery. |
| Route | Optional — origin + waypoints + destination. |
| Status | Pending → InTransit → Delivered → Verified. |
14.3 The link to Store
Bills, Statements, Returns & Vouchers
Once goods land, the supplier bills you. The system matches their invoice against the PO and Delivery, runs a periodic statement reconciliation, and supports two voucher types for cost allocation.
15.1 Three-way match
| Document | Quantity | Price |
|---|---|---|
| Purchase Order | OrderedQty | Unit Price (quoted) |
| Delivery | ReceivedQty | — |
| Bill (Vendor invoice) | BilledQty | Unit Price (invoice) |
| Match | Ordered = Received = Billed AND Quoted = Invoice ⇒ approve. Else flag for review. | |
15.2 Statements
Each vendor has a running PurchaseStatement — an opening balance + period transactions + closing balance. Reconciliation compares this with the supplier's own statement.
15.3 Returns
PurchaseReturn records goods sent back (damaged / wrong / over-supplied). It reverses the matching StoreEntry via a negative StoreExit.
15.4 Vouchers
- Expense Voucher — costs incurred against a PO (freight, customs, demurrage).
- Income Remittance Voucher — refunds, settlements received.
- Voucher Case — group multiple vouchers under one heading for posting.
Sales / POS — Overview, Terminals & Lookups
CoreThe Sales / POS module is the counter-side of Inventory ERP. Seven sub-modules, six top-level controllers and ~12–15 Razor pages drive a cashier from session-open to Z-Report.
16.1 The seven sub-modules
| Sub-module | Owns |
|---|---|
| POS Terminal Setup | Registers each till, default cashier, store mapping. |
| POS Session Mgmt | Open / close session, opening balance, closing balance, variance. |
| Point of Sale (Cart) | Add / remove lines, qty, live total. |
| Discounts & Tax | % / amount discount, tax recompute. |
| Payment Processing | Cash, card, multi-tender, change. |
| Receipt & Void/Return | Print, void, return-receipts. |
| Sales Reporting | Daily summary, terminal recon, cashier perf. |
16.2 The seven POS tables
| Table | Purpose |
|---|---|
POS_Terminal | Each till — store, default cashier, status. |
POS_Session | Open / close, opening balance, closing balance, variance. |
POS_Sale | Sale header — customer, subtotal, discount, tax, total, paid, change. |
POS_SaleLine | Each cart line — qty, unit price, discount %, tax %, line total. |
POS_Payment | Each tender — method, amount, reference, card last-4, auth code. |
POS_PaymentMethod | Cash / Card / Cheque / Voucher / Wallet — code + flags. |
StoreInventoryItem (shared) | What you sell — referenced from POS_SaleLine. |
16.3 Top-level controllers
- PosTerminalController — terminal CRUD.
- PosSessionController — Open, Close, Active (by cashier).
- PosSaleController — NextNumber, Save, GetById, Search, Void.
- PosPaymentMethodController — payment method CRUD.
- PosLookupController — items, customers, payment methods, cashiers for dropdowns.
- PosReportController — SalesSummary, DayClose.
StoreInventoryItem and writes it down via StoreExit — Sales and Store are tightly coupled at the sale-completion step.Sessions, Sales & Tendering
The day on a POS goes Session-Open → ring sales → Tender → Print → repeat → Session-Close. This chapter walks each step.
17.1 Open the session
- Cashier logs in. POS → Open Session.
- Pick the Terminal. The default opening balance is the previous close — adjust if a manager has dropped cash.
- SP
PosSession_Opencreates thePOS_Sessionrow with status Open.
17.2 Ringing a sale
| Item | Qty | Price | Disc % | Tax % | Line Total |
|---|---|---|---|---|---|
| HP Mouse | 2 | 50.00 | 0 | 5 | 105.00 |
| USB Cable 2m | 5 | 15.00 | 10 | 5 | 70.88 |
| Notebook A5 | 10 | 8.00 | 0 | 5 | 84.00 |
17.3 Tendering
- Cash — enter tendered amount, system calculates change.
- Card — enter auth code & last-4.
- Multi-tender — keep adding payment lines until PaidAmount ≥ TotalAmount; the difference is change.
- Void — only before tender complete.
17.4 Sale completion
On Save, the SPs run in this order: POS_Sale_Insert → POS_SaleLine_Insert (per line) → POS_Payment_Insert (per tender) → StoreExit_Insert (per stock-impact line) → StockAtStore_Update.
POS Reports & Day-End Close
End-of-day is a discipline. The Cashier closes the session, the Manager reviews variance, and the Reports section gives finance a clean roll-up.
18.1 Closing a session
- POS → Close Session.
- Enter the Closing Balance (physical count of cash drawer).
- SP
PosSession_Closecomputes:ExpectedBalance = OpeningBalance + SalesTotal − PayoutsTotal VarianceAmount = ClosingBalance − ExpectedBalance
- If variance is non-zero, a flag is set and the Manager must sign off.
18.2 Z-Report
The Z-Report is the per-session daily summary. Header (terminal, cashier, dates), totals (gross sales, discounts, tax, net), payment-method breakdown, line-count, void count, refund count, and variance.
18.3 Manager reports
| Report | Filter | Used by |
|---|---|---|
| Sales Summary | Date range, store, terminal | Floor manager |
| Day Close | Date | Finance |
| Cashier Performance | Cashier × period | HR / Manager |
| Top Items | Date range, store | Buyer |
| Tax Roll-up | Period | Finance |
POS_Session while the previous is Open.Store — Module Overview & Masters
CoreThe Store module is the warehouse-floor truth. It owns ~25 tables and 100+ SPs that govern what is on the shelf, where it is, who put it there, and what state it's in.
19.1 The eleven sub-modules
- Store Master Data — store registry, location, employee assignment.
- Inventory Masters — Item Category / Type / Brand / Grade / Units.
- Stock Inward (GRN-like) — StoreEntry against PO/Delivery.
- Bin / Location — physical bin assignment, geo coords.
- Stock Balance — opening / closing qty, thresholds, refill triggers.
- Issue (Exit) — to project, site, or sale.
- Inter-store Transfer — consigner → consignee.
- Stock Count / Audit — physical vs. system; variance review.
- Damaged / Dead Stock — log + approval + disposal.
- Store Expenses & Petty Cash — operational ledger.
- Delivery Logistics — receipt note, transport.
19.2 Stock Balance — the source of truth
StockAtStore holds the per-(Store × Item) snapshot. Every Entry / Exit / Audit changes its ClossingBalanceQuantity via SPs — never directly.
| Field | Meaning |
|---|---|
| OpeningBalanceQuantity | Period-start qty (from the previous close). |
| TransferredQuantity | Net effect of all entries / exits in the period. |
| ClossingBalanceQuantity | Live qty. |
| ThreshHoldQuantity | Reorder trigger. |
| ThreshHoldRefillQuantity | Suggested refill amount. |
| LastPricePerUnit / AveragePricePerUnit | For valuation. |
Inward (GRN), Issue & Transfer
Three kinds of stock movement. Each writes a row in either StoreEntry or StoreExit and updates StockAtStore via the matching SP.
20.1 Inward
- From a Delivery (Chapter 14), the system auto-creates a StoreEntry. Or open Store → Inward for an ad-hoc receipt.
- Enter Qty, Unit, Received By, Movement Type, Remarks.
- Stock balance increments on the dashboard — QtyAfter = QtyBefore + received.
20.2 Issue (Exit)
For consumption — to a project site, a department, a sale (POS already does this for you). Store → Issue.
20.3 Inter-store transfer
One physical movement = two virtual events. The consigner store posts a StoreExit; the consignee store posts a corresponding StoreEntry, linked back via VirtualEntryID.
| Movement type | Entry / Exit | Use |
|---|---|---|
| Purchase Receipt | Entry | Goods from a vendor delivery. |
| Return From Site | Entry | Project return. |
| Sale (POS) | Exit | Goods sold across the counter. |
| Issue To Project | Exit | Consumption at a site. |
| Inter-Store Transfer Out / In | Exit / Entry pair | Re-balancing stock. |
| Damaged / Lost | Exit (with reason) | Routes to Damaged Stock for approval. |
Stock Audit, Variance & Damaged Stock
Periodic counts catch what entries and exits miss — pilferage, breakage, mis-shelving. The Store has a formal Audit cycle.
21.1 Run an audit
- Open Store → Stock Audit. Generate a batch via
StoreAuditingBatchCODEGenerator. - Walk the floor with a print-out (or scanner). Count physical qty per item.
- Enter Audited Unit Count. The SP computes variance against
StockAtStore.ClossingBalanceQuantity.
21.2 Variance disposition
| Variance | Action | Status |
|---|---|---|
| Zero | Approve. No adjustment. | Approved |
| Positive (more physical) | Investigate; if genuine, post adjustment Entry. | Flagged |
| Negative (less physical) | If breakage → Damaged Stock; if loss → write-off. | Damaged / Lost |
21.3 Damaged Stock
StoreDamagedItem rows are pending until a manager approves. On approval, a StoreExit is posted with reason Damaged; on rejection, the variance is reversed.
21.4 Dead Stock
DeadStock is for items still on the shelf but unlikely to move (obsolete, expired). Approval routes can write them off or move them to a clearance bin.
Closing Balance & Period Close
At the end of every accounting period, you freeze stock. The current closing balance becomes the next period's opening, and a snapshot is stored on StoreClossingBalanace + StoreClossingBalanceDetails.
22.1 Pre-close checks
- All Deliveries linked to closed POs are received or formally returned.
- All POS sessions are closed (no Open rows in
POS_Session). - All audit variances are dispositioned (no Flagged rows).
- Damaged / Dead Stock items are approved or rejected.
22.2 Run the close
- Open Store → Closing Balance. Pick Period End Date.
- The SP
StoreClossingBalanace_Insertsnapshots everyStockAtStorerow into the header + details. - The next period's opening balances are seeded automatically.
22.3 What is frozen
| Field | Source |
|---|---|
| OpeningBalanceQuantity | Previous close. |
| EntriesQty / ExitsQty | Sum of period entries & exits. |
| AdjustmentsQty | Audit-driven adjustments. |
| DamagedQty | Approved damaged stock. |
| ClosingQty | OpeningQty + EntriesQty − ExitsQty − DamagedQty + AdjustmentsQty. |
| ClosingValue | ClosingQty × AveragePricePerUnit. |
Store Reports
| Report | Question it answers |
|---|---|
| Stock Balance | What is on the shelf right now, by store and item? |
| Movement Log | Every Entry and Exit in a date range. |
| Reorder Suggest | Items below threshold + recommended refill qty. |
| Audit Variance | Per-batch audit results with variance and disposition. |
| Damaged / Dead Stock | Approved write-off log. |
| Closing Balance Summary | Period roll-up — closing qty & value per item. |
| Inter-Store Transfer | All inter-store moves, in transit + delivered. |
| Item Valuation | Per-item stock value at last / average / FIFO. |
Accounts — Chart of Accounts & Ledgers
The Accounts module is the General Ledger. It is shared with the BackOffice ERP and contains a clean double-entry core wrapped in audit and reporting helpers.
24.1 Chart of Accounts
Two-level structure: LedgerGroups (Asset / Liability / Equity / Income / Expense) parent each Ledger. Groups can themselves nest via ParentGroupID.
| Group | Type | Example Ledgers |
|---|---|---|
| Cash & Bank | Asset | Cash on Hand, Petty Cash, Main Bank, Card Settlement |
| Receivables | Asset | Customer Control, Trade Receivable |
| Inventory | Asset | Stock — Main Store, Stock — Site Store |
| Payables | Liability | Supplier Control, Tax Payable |
| Income | Income | Sales — Counter, Sales — Online, Other Income |
| Cost of Goods | Expense | COGS — Counter, Damaged Stock |
| Operating Expense | Expense | Rent, Salary, Maintenance, Fuel |
24.2 Domain Account Master
Accounts_DomainAccountMaster is a per-domain (per-app) override of the chart, so Inventory and BackOffice can share the same physical ledgers but expose different subsets in their menus.
24.3 Sub-ledgers
Each Customer or Supplier appears as a SubLedger under the Receivables / Payables control account. This lets aged-receivable / payable reports drill from a control balance into the underlying parties.
Journal, Petty Cash & Voucher Types
Posting to the GL is two-step: a Transaction header + many TransactionDetails. The detail rows must balance — Σ Debit = Σ Credit.
25.1 Voucher types
| Code | Name | Typical use |
|---|---|---|
JV | Journal Voucher | Free-form correction or adjustment. |
RV | Receipt Voucher | Cash received — POS day-end, customer payment. |
PV | Payment Voucher | Cash paid — supplier voucher, expense. |
CV | Contra Voucher | Bank-to-cash, cash-to-bank. |
BV | Bank Voucher | Card settlement, bank charges. |
25.2 Posting a journal
- Open Accounts → Journal. Click New.
- Header: Date, VoucherType, ReferenceNo, Narration, PaymentMode.
- Add detail rows — each Ledger × Debit / Credit. The footer shows the running totals; Save is disabled until they match.
- SP
Accounts_Transaction_Insertwrites the header;Accounts_TransactionDetails_Insertwrites each line, then validates balance.
25.3 Petty Cash
The PettyCashLedger is a fast-path for small disbursements. Each row is a single line spend (purpose, amount, paid-by). Periodic settlement posts a summary JV to the main ledger.
Accounts Reports & MGS Export
26.1 Canned reports
| Report | What it shows |
|---|---|
| Balance Sheet | Asset / Liability / Equity grouped by category as of a date. |
| Cash Book | Date-range view of receipts / payments by ledger. |
| Top Expenses | Top-N expense ledgers by amount. |
| Monthly Trends | Last 12 months — Receipt count / Payment count / totals. |
| Trial Balance | All ledgers' debit / credit at as-of date. |
| Aged Receivables | Customer balances bucketed 0–30 / 31–60 / 61–90 / 90+. |
| Aged Payables | Supplier balances similarly bucketed. |
26.2 MGS Export
MGS = MasGen Suite — the export pipeline that pushes posted transactions to an external GL or BI tool. Four tables drive it:
MgsExportHeads— export categories.MgsExportMapper— maps a posted transaction to an export head, with credit/debit amount and edit flag.MgsExportReleaseMaster— a release batch (header).MgsExportReleaseLog— append-only log of what was sent.
AccountsPhase5Controllers.Accounts Gateway — Cross-Module Posting
BridgeThe Accounts Gateway is the bridge that pushes Customer- and Supplier-side transactions from operational modules (Sales, Purchase, Payments, Reservation) into the Accounts ledger. It avoids cross-module coupling and gives finance a single inbox of postings to review.
27.1 The three SPs
| SP | Triggered by | Effect |
|---|---|---|
Payments_AccountsGateWay_Customer_Insert | POS sale, Customer invoice payment, Reservation invoice payment. | Inserts a candidate Customer-side ledger entry. |
Payments_AccountsGateWay_Supplier_Insert | Supplier voucher payment, Purchase bill settlement. | Inserts a candidate Supplier-side ledger entry. |
Payments_AccountsGateWay_ListActionItems_Select | Accountant opens the Gateway page. | Returns the queue of unposted candidates. |
27.2 The Gateway page
| SL | Booking Ref | Type | Customer / Supplier | Net | Comm. | Sell | Posted | Action |
|---|---|---|---|---|---|---|---|---|
| 1 | POS-20260510-0042 | POS Sale | Walk-in #042 | — | — | 259.88 | 2026-05-10 14:32 | Post |
| 2 | BILL-2026-0089 | Supplier Bill | ABC Trading | 4,180 | — | — | 2026-05-10 11:14 | Post |
| 3 | INV-2026-0312 | Customer Invoice | Greenfield Hospital | — | — | 15,400 | 2026-05-10 09:55 | Post |
27.3 The post action
- Accountant clicks Post. The Gateway candidate is wrapped in an
Accounts_Transactionwith the appropriate VoucherType (RV for customer, PV for supplier). - Detail rows are produced: e.g. customer payment → Cash Dr 259.88 / Sales Cr 247.50 / Tax Cr 11.88.
- The Gateway row is marked Posted with the new TransactionID.
- Released to
Accounts_ReleaseLogfor audit.
Status & Notification Reference
Every long-lived row carries a status. This chapter is a quick-look table.
| Entity | Statuses |
|---|---|
| AssetItem | Active Under Audit Discrepancy Recommend Disposal Disposed |
| POR | Draft Submitted Approved Quoted Ordered Cancelled |
| PO | Draft Active Invoiced Delivered Closed Cancelled |
| Delivery | Pending In Transit Received Verified Returned |
| POS_Session | Open Closed |
| POS_Sale | Completed Voided Pending |
| StoreEntry | Pending Received Cancelled |
| StoreAuditing | Pending Approved Rejected Flagged |
| Damaged Stock | Pending Approved Disposed |
| Accounts_Transaction | Pending Posted Cancelled Reconciled |
28.1 Notifications you'll see in the Inbox
- POR submitted by buyer (to approver).
- PO ready for approval / partial delivery alert.
- Stock below threshold (reorder suggestion).
- Audit variance flagged for manager review.
- Accounts Gateway has un-posted candidates.
Troubleshooting
29.1 Top issues
| Symptom | Likely cause | Fix |
|---|---|---|
| "Cannot Open Session" on POS | Previous session still Open. | Find & close it from POS → Active Session. |
| Sale won't save — "stock unavailable" | StockAtStore at zero or negative for the line item. | Run a Stock Audit; receive matching Inward; confirm with StockAtStore_SelectByID. |
| PO bill doesn't post to ledger | Accounts Gateway candidate not posted. | Open Accounts → Gateway; click Post. |
| Asset value report shows zero | AssetValueMonitor not seeded; or all events used raw inserts. | Run AssetValueMonitor_Insert to seed; redo cost entries through SPs. |
| Vendor quote not visible in Compare | Vendor link missing on POR or quote not Submitted. | Re-invite vendor; ensure Quote status = Submitted. |
| "Variance amount cannot be auto-resolved" | Audit variance not dispositioned before close. | Disposition all flagged audit rows; re-run period close. |
| Period close blocked | Open POS sessions or in-transit deliveries. | Run pre-close checks (Chapter 22). |
| Movement save error — "backdated" | MovementDate before last AssetValueMonitor row. | Move the date forward; or escalate to DBA for snapshot reset. |
Glossary
| Term | Meaning |
|---|---|
| POR | Purchase Order Request — the formal departmental ask before quotes are invited. |
| PO | Purchase Order — the legal commitment to buy from a chosen vendor. |
| PWO | Purchase Work Order — internal execution doc derived from a PO. |
| GRN | Goods Received Note — the acknowledgement that goods arrived; in this system, the equivalent is a Delivery row + an auto-created StoreEntry. |
| StoreEntry / StoreExit | The two journal-style rows that change StockAtStore. |
| StockAtStore | The per-(Store × Item) live stock snapshot. |
| POS_Session | One day's-work-on-a-till — Open → Sales → Close. |
| Z-Report | Per-session daily summary printed at session close. |
| Multi-tender | A sale paid with more than one payment method. |
| AssetValueMonitor | Per-period book value snapshot for an asset. |
| HiredItem | Rented asset — parallel hierarchy to AssetItem. |
| Voucher (RV / PV / JV / CV / BV) | Receipt / Payment / Journal / Contra / Bank — the five voucher types in Accounts. |
| Accounts Gateway | The bridge that posts operational events into the GL. |
| SubLedger | A customer or supplier sitting under a control account (Receivables / Payables). |
| MGS Export | The pipeline that releases posted transactions to an external GL or BI tool. |
| Workflow Listener | The UM-side engine that propagates approvals across modules. |
| SP-driven | The architecture rule — every read & write goes through a stored procedure, never raw SQL or LINQ. |
| RBAC | Role-Based Access Control — UserRolePrivileges × SubMenu × PagePrivilegeTypes. |
| SignalR | The transport that powers Blazor's live UI updates — dispatch boards, dashboards, audit screens. |