Folks Inventory ERP

Asset · Purchase · Sales/POS · Store · Accounts — User Manual

Version 3.0  |  May 2026  |  MasGen Innovations

7 Modules · 130+ Tables · 700+ Stored Procedures · 100+ Razor Pages
01

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.

SP-driven core

Every read and write goes through a named stored procedure — predictable, auditable, no LINQ in business logic.

RBAC & menu privileges

Roles map to designations, designations to menus & sub-menus, sub-menus to page actions (View / Create / Edit / Delete / Approve).

Blazor Server UI

.NET Blazor with SignalR — stock balances, POS carts, audit screens refresh in real time.

Accounts Gateway

Bridges Sales/Purchase/Payments into the GL — operational events post into ledger asynchronously, no cross-module coupling.

Modules in this manual

#ModulePurposeKey entities
1AssetLifecycle of every owned/hired asset — onboarding, movement, maintenance, audit, disposal.AssetType, AssetCategory, AssetItem, DeviceMaster, EquipmentMaster, UtilityMaster, HiredItem
2PurchaseProcure-to-Pay — Plan, POR, Quotation, PO, Work Order, Delivery, Bills.PurchasePlan, PurchaseOrderRequest, Quotation, PurchaseOrder, Delivery, PurchaseBills, Vendors
3Sales / POSCounter-side selling — terminals, sessions, multi-tender, receipts, Z-Report.POS_Terminal, POS_Session, POS_Sale, POS_SaleLine, POS_Payment, POS_PaymentMethod
4StoreWarehouse operations — items, inward, issue, transfer, audit, period close.StoreMaster, StoreInventoryItem, StoreEntry, StoreExit, StoreAuditing, StockAtStore
5AccountsGeneral ledger — Chart of Accounts, journal entries, petty cash, reports.Accounts_LedgerGroup, Accounts_Ledger, Accounts_Transaction, Accounts_TransactionDetails
6Accounts GatewayBridge that pushes Customer / Supplier postings from Sales / Purchase / Payments into the ledger.AccountsGateway_Customer, AccountsGateway_Supplier, ActionItems queue
7User Management LockedLogin, employees, departments, designations, roles, menus, workflow.Login, Users, UserRoles, UserRolePrivileges, MainMenu, SubMenu, Workflow*

The data flow at a glance

Receive
Store
Asset / Stock
Sell / POS
Gateway
Ledger
Companion manual. If you process travel reservations, customer invoices and supplier vouchers, see the Folks BackOffice ERP Manual — it shares the same UM and Accounts modules but adds Reservation, Operations, Approval and Payments.
02

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

  1. Open the FE URL in your browser. The Login page accepts Username and Password.
  2. On success, you receive a JWT and are redirected to the role's DefaultPath (set on the Login row).
  3. If your Login.Status is Inactive or Blocked, the system rejects you with an admin-only resolution.

2.2 Roles you'll meet

RoleSeesCannot
SuperAdminAll modules & menus.(none — full access)
AdminModule-scoped admin (e.g. Store Admin).UM master setup; cross-module approvals out of scope.
StorekeeperStore inward / issue / audit.POS, Accounts, vendor master.
CashierPOS terminal & session.Store transactions, supplier data.
BuyerPlan, POR, Quotation, PO.POS, Store inward.
AccountantChart of accounts, journals, reports.POS sale entry, store audit.

2.3 The page anatomy

Folks Inventory ERP — Standard list page
Add Refresh Export Search…
#CodeNameStatusActions
1AC-2026-0001Carrier 38KVR — OT-1Active
2AC-2026-0002Carrier 38KVR — OT-2Under 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.
Don't change the Code after save. Codes feed downstream lookups (PO ↔ Delivery ↔ Bill) — once printed on a slip or pushed to Accounts Gateway, they must not move.
03

User Management (UM)

Locked

The 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

Login ──▶ Users ──▶ UserRoles ──▶ UserRolePrivileges ──▶ SubMenu ──▶ MainMenu │ │ │ └──▶ PagePrivilegeTypes (View / Create / Edit / Delete / Approve) │ └──▶ DefaultPath (where to land after login)

3.2 Tables you may need to know

TablePurpose
LoginUserName / Password / Status / DefaultPathID / LoginTypeID.
EmployeeRegEmployee profile with image & designation.
Department / DesignationOrg hierarchy.
DesignationRolesDefault roles bundled per designation.
UserRolesThe role(s) a user holds.
UserRolePrivileges(UserRolesID × SubMenuID × PagePrivilegeTypes) — the actual gate.
UserOverRideRightsPer-user exception (grant or deny).
MainMenu / SubMenuNavigation tree with ViewPath.
PagePrivilegeTypesThe five action verbs allowed against any page.
InternalWorkflow / ExternalWorkflow / WorkflowListenerThe state-machine engine that powers approvals across modules.
ActivityLogAppend-only audit trail — who did what, when.
Locked module. Do not modify UM API/FE/DB code in either ERP without an explicit change request — both Inventory and BackOffice depend on identical contracts.
04

Asset — Module Overview & Hierarchy

Core

The 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

General Assets

Most "things" — furniture, vehicles, machinery. Held by AssetType → AssetCategory → AssetItem.

Devices

Electronic / IT-class items with serial-number and geo-movement detail. DeviceMaster + DeviceType.

Equipment

Heavy / specialised gear (drills, scaffolding). EquipmentMaster + EquipmentType.

Utilities

Site-tied utility units (gensets, AC packs). UtilityMaster + UtilityType.

4.2 Sub-modules & what they own

Sub-modulePagesNotes
Asset MasterAssetType, AssetCategory, AssetItem, AssetItemUnitDetailsThree-level taxonomy with units (each → kg / set / pair…).
Audit & LifecycleAssetAuditing, AssetAuditStatus, AssetDispose, AssetDisposeTypesAudits drive disposal decisions.
Movement & OperationsAssetOperation, GeneralAssetMovement, *MovementGeoPer-family movement + lat/long.
MaintenanceAssetMaintenance, MaintenanceExpenses, MaintenanceCostSchedule + log expenses.
Costing & ValuationAssetValueMonitor, OperationalAndUsageCosting, LabourCost, FuelOrEnergyCost, ServiceCost, SpareCostFeeds depreciation; recompute on every event.
Hired/RentalHiredCategory, HiredItem, HiredOperation, HiredRentCosting, HiredRentedLeaseAgencyParallel hierarchy for rented things.
Location & ContactsLocationDetails, Contacts, ProjectSites, ProjectSiteEmployeeWhere the asset lives + who's responsible.
Petty & MiscPettyCashLedger, ImagePathField-level cash; image attachments per asset.

4.3 The asset's life

Onboard
Assign
Move
Maintain
Audit
Dispose
Approx counts: 35+ tables, 130+ stored procedures, 23 Razor pages, 11 named controllers + 44 FE services.
05

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

AssetType ──▶ AssetCategory ──▶ AssetItem ──▶ AssetItemUnitDetails IT Laptops HP 840 (each, set) Vehicles SUVs Toyota Prado (each) Machinery Pumps Grundfos CR (each, hour-meter)

5.2 Adding a new Asset Type

  1. Open Asset → Asset Type.
  2. Click Add. Enter Type Name and Description. Leave Code blank — the SP CF_MasGen_FolksERP_Asset_AssetType_Insert generates it.
  3. Save. The grid refreshes.

5.3 Adding a Category under a Type

  1. Open Asset → Asset Category. Pick the parent Asset Type.
  2. Add the category. The dropdown is filtered by AssetCategory_SelectByAssetTypeID.

5.4 Asset Item — the actual master

Asset → Asset Item — Add
IT Hardware
Laptops
HP EliteBook 840 G10
(auto)
each
Yes
Save

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.

ItemUnitConversion to defaultDefault?
HP EliteBook 840each1.000Yes
Wall Paint — Apex Whitelitre1.000Yes
Wall Paint — Apex White5L can5.000No
Wall Paint — Apex White20L drum20.000No
Pro tip. The default unit is what stock balances are stored in. Changing it later forces a recalculation of every StockAtStore row for that item — get this right at master-creation time.
06

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.

ConceptOwnedHired
MasterAssetItem / DeviceMaster / EquipmentMaster / UtilityMasterHiredItem
Operation logAssetOperation / GeneralAssetMovementHiredOperation
CostingOperationalAndUsageCosting + LabourCost / FuelOrEnergyCost / ServiceCost / SpareCostHiredRentCosting (rental period × rate)
Counterparty(internal — assigned employee / site)HiredRentedLeaseAgency
Disposal?Yes — full disposal flow.No — return to agency.
Choose the family at master-creation time — converting an AssetItem into a DeviceMaster post-fact is not supported and would orphan its movement history.
07

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

FieldMeaning
FromLocation / ToLocationProject Site or Store IDs.
FromEmployee / ToEmployeePerson handing over / receiving.
MovementDateUTC timestamp.
ReasonFree text or controlled list (Transfer / Repair / Loan / Return…).
StatusInTransit → Received → Closed.
Lat / LongCaptured at receive — stored on *MovementGeoLocation.

7.2 The flow

Initiate
In Transit
Geo Captured
Received

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.

Don't backdate. Movements with a MovementDate earlier than the asset's last AssetValueMonitor snapshot will fail revaluation — the SP rejects them.
08

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

  1. Open Asset → Asset Maintenance. Pick the AssetItem.
  2. Enter Scheduled Date, Type (Preventive / Corrective / Calibration), Owner.
  3. On completion, set the Completed Date and a Remark — this closes the maintenance row.

8.2 Cost capture

Cost lineTablePosted to
LabourLabourCostMaintenance + Costing roll-up
Fuel / EnergyFuelOrEnergyCostOperational costing
Service (3rd party)ServiceCostMaintenance
Spare partsSpareCostMaintenance + (optional) Store issue
Maintenance expense (catch-all)MaintenanceExpensesMaintenance
Operational + usageOperationalAndUsageCostingAsset 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.

Read also: Chapter 9 — Auditing & Disposal — explains how monthly audits trigger disposal candidates based on accumulated maintenance cost vs. depreciated value.
09

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

  1. Open Asset → Asset Auditing. Pick the period & auditor.
  2. For each AssetItem, the SP AssetAuditing_Select shows expected location, last movement, accumulated cost, and book value.
  3. Auditor sets the AuditStatus: OK, Flag for Review, Recommend Disposal.

9.2 Audit statuses (table)

StatusMeaning
OKAsset present, condition acceptable.
Under AuditIn progress; physical check pending.
DiscrepancyPhysical doesn't match system — needs adjustment.
Recommend DisposalAuditor has flagged for retirement.
DisposedClosed 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

  1. From Asset Auditing, choose Recommend Disposal.
  2. Open Asset → Asset Dispose. The candidate appears.
  3. Pick a Dispose Type (Sold / Scrapped / Donated / Lost). Enter buyer/agency, sale value, date.
  4. Save — the SP marks the asset Disposed, freezes the value monitor row, and (if Sold) creates a journal candidate for Accounts Gateway.
Disposal does not delete the asset — its history remains queryable via the original AssetItemID. Use IsActive=false filtering on list pages.
10

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.

#ReportAnswers
1Asset Item ReportMaster listing with codes, owners, current location.
2Asset Type ReportRoll-up by AssetType — count and total value.
3Asset Category ReportRoll-up by Category — drill into Items.
4Auditing ReportAudit log with status & auditor for the period.
5Operations ReportMovement & operational events log.
6Asset Dispose ReportDisposed assets with type, date, and proceeds.
7General Asset Movement ReportAll movements across families with from/to and dates.
Export tip. Each report has an Excel button on the toolbar — exports the current filtered view, not the underlying SP results.
11

Purchase — Module Overview

Core

The 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-moduleOwns
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 & ComparisonRFQ 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.
DeliveryGoods receipt at the dock.
LogisticsVehicle / route / driver per delivery.
VendorsSupplier master with contacts, payment terms.
Bills & StatementsVendor invoices and account statements.
Vouchers (Expense / Income)Cost allocation and remittance.
Returns & Daily ReportsGoods return, adjustments, daily local-purchase log.

11.2 The end-to-end flow

PurchasePlan ──▶ POR ──▶ Invite Vendors ──▶ Quotation ──▶ Compare │ │ │ ▼ │ Select Vendor(s) │ │ ▼ ▼ DailyLocalPurchase <── Returns <── Bills/Statements <── Delivery <── PO <── Work Order
Counts: 42 tables, 35 named controllers + 80 auto-gen SP controllers, 22 Razor pages, 18 FE service classes.
12

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

  1. Open Purchase → Purchase Dictionary → Vendor Entry.
  2. Enter the basics — Name, Trade Licence, VAT/TRN, Country, City, Currency, Payment Terms.
  3. Add Contacts (multiple) — name, role, phone, email. Mark one as Primary.
  4. 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

ItemVendor AVendor BVendor CBest
HP EliteBook 8404,2504,1804,300B
Dell 24" Monitor650675620C
Logitech MX Keyboard180175190B
You can split-award (B for line 1, C for line 2) — the comparison page lets you tick the winning vendor per line and create one PO per vendor at the end.
13

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.

FieldNote
POR No / DateAuto-generated.
Department / ProjectSiteDrives delivery distribution.
Lines (Item × Qty × Unit)From StoreInventoryItem or asset master.
Delivery DistributionMulti-row — split delivery across sites + dates.
StatusDraft → Submitted → Approved → Quoted → Ordered → Cancelled.

13.3 PO statuses

Draft
Active
Invoiced
Delivered
Closed
Cancelled

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.

Quantity rules. The PO line carries OrderedQty; the WO carries WorkOrderQty; the Delivery carries ReceivedQty. The three are reconciled at bill matching — see Chapter 15.
14

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

FieldNote
VehicleType / VehicleNoFrom M_VehicleType master.
Driver / DriverPhoneFree-form on this delivery.
RouteOptional — origin + waypoints + destination.
StatusPending → InTransit → Delivered → Verified.

14.3 The link to Store

PurchaseOrder ──▶ Delivery ──▶ StoreEntry ──▶ StockAtStore (+qty) │ └──▶ DeliveryLogistics
Closing a Delivery without all lines received marks the PO as Partial — the remaining qty stays open and can be received later, or formally cancelled with a Return.
15

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

DocumentQuantityPrice
Purchase OrderOrderedQtyUnit Price (quoted)
DeliveryReceivedQty
Bill (Vendor invoice)BilledQtyUnit Price (invoice)
MatchOrdered = 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.
Where it goes: Approved bills, returns and vouchers post into the Accounts Gateway (Chapter 27) and from there into the GL.
16

Sales / POS — Overview, Terminals & Lookups

Core

The 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-moduleOwns
POS Terminal SetupRegisters each till, default cashier, store mapping.
POS Session MgmtOpen / close session, opening balance, closing balance, variance.
Point of Sale (Cart)Add / remove lines, qty, live total.
Discounts & Tax% / amount discount, tax recompute.
Payment ProcessingCash, card, multi-tender, change.
Receipt & Void/ReturnPrint, void, return-receipts.
Sales ReportingDaily summary, terminal recon, cashier perf.

16.2 The seven POS tables

TablePurpose
POS_TerminalEach till — store, default cashier, status.
POS_SessionOpen / close, opening balance, closing balance, variance.
POS_SaleSale header — customer, subtotal, discount, tax, total, paid, change.
POS_SaleLineEach cart line — qty, unit price, discount %, tax %, line total.
POS_PaymentEach tender — method, amount, reference, card last-4, auth code.
POS_PaymentMethodCash / 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.
The POS reads stock from StoreInventoryItem and writes it down via StoreExit — Sales and Store are tightly coupled at the sale-completion step.
17

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

  1. Cashier logs in. POS → Open Session.
  2. Pick the Terminal. The default opening balance is the previous close — adjust if a manager has dropped cash.
  3. SP PosSession_Open creates the POS_Session row with status Open.

17.2 Ringing a sale

POS — Active Cart
ItemQtyPriceDisc %Tax %Line Total
HP Mouse250.0005105.00
USB Cable 2m515.0010570.88
Notebook A5108.000584.00
Subtotal: 245.00  ·  Disc: -7.50  ·  Tax: 11.88  ·  Total: 259.88
Tender

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_InsertPOS_SaleLine_Insert (per line) → POS_Payment_Insert (per tender) → StoreExit_Insert (per stock-impact line) → StockAtStore_Update.

Cart is cleared, receipt is printed, terminal is back to its idle screen — ready for the next customer.
18

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

  1. POS → Close Session.
  2. Enter the Closing Balance (physical count of cash drawer).
  3. SP PosSession_Close computes:
    ExpectedBalance = OpeningBalance + SalesTotal − PayoutsTotal
    VarianceAmount  = ClosingBalance − ExpectedBalance
  4. 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

ReportFilterUsed by
Sales SummaryDate range, store, terminalFloor manager
Day CloseDateFinance
Cashier PerformanceCashier × periodHR / Manager
Top ItemsDate range, storeBuyer
Tax Roll-upPeriodFinance
Don't skip the close. An unclosed session blocks the next morning's open — the SP refuses to start a new POS_Session while the previous is Open.
19

Store — Module Overview & Masters

Core

The 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.

FieldMeaning
OpeningBalanceQuantityPeriod-start qty (from the previous close).
TransferredQuantityNet effect of all entries / exits in the period.
ClossingBalanceQuantityLive qty.
ThreshHoldQuantityReorder trigger.
ThreshHoldRefillQuantitySuggested refill amount.
LastPricePerUnit / AveragePricePerUnitFor valuation.
20

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.

Store-A (consigner) Store-B (consignee) │ │ ▼ ▼ StoreExit (-10) ──link──▶ StoreEntry (+10) │ │ ▼ ▼ StockAtStore-A: -10 StockAtStore-B: +10
Movement typeEntry / ExitUse
Purchase ReceiptEntryGoods from a vendor delivery.
Return From SiteEntryProject return.
Sale (POS)ExitGoods sold across the counter.
Issue To ProjectExitConsumption at a site.
Inter-Store Transfer Out / InExit / Entry pairRe-balancing stock.
Damaged / LostExit (with reason)Routes to Damaged Stock for approval.
21

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

  1. Open Store → Stock Audit. Generate a batch via StoreAuditingBatchCODEGenerator.
  2. Walk the floor with a print-out (or scanner). Count physical qty per item.
  3. Enter Audited Unit Count. The SP computes variance against StockAtStore.ClossingBalanceQuantity.

21.2 Variance disposition

VarianceActionStatus
ZeroApprove. 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.

Audit adjustments hit Cost of Goods — they are expensive when accumulated. Review variance trends monthly.
22

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

  1. Open Store → Closing Balance. Pick Period End Date.
  2. The SP StoreClossingBalanace_Insert snapshots every StockAtStore row into the header + details.
  3. The next period's opening balances are seeded automatically.

22.3 What is frozen

FieldSource
OpeningBalanceQuantityPrevious close.
EntriesQty / ExitsQtySum of period entries & exits.
AdjustmentsQtyAudit-driven adjustments.
DamagedQtyApproved damaged stock.
ClosingQtyOpeningQty + EntriesQty − ExitsQty − DamagedQty + AdjustmentsQty.
ClosingValueClosingQty × AveragePricePerUnit.
You can't undo a close. Reopening a period is a controlled DBA operation — plan reconciliations before you click Close.
23

Store Reports

ReportQuestion it answers
Stock BalanceWhat is on the shelf right now, by store and item?
Movement LogEvery Entry and Exit in a date range.
Reorder SuggestItems below threshold + recommended refill qty.
Audit VariancePer-batch audit results with variance and disposition.
Damaged / Dead StockApproved write-off log.
Closing Balance SummaryPeriod roll-up — closing qty & value per item.
Inter-Store TransferAll inter-store moves, in transit + delivered.
Item ValuationPer-item stock value at last / average / FIFO.
24

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.

GroupTypeExample Ledgers
Cash & BankAssetCash on Hand, Petty Cash, Main Bank, Card Settlement
ReceivablesAssetCustomer Control, Trade Receivable
InventoryAssetStock — Main Store, Stock — Site Store
PayablesLiabilitySupplier Control, Tax Payable
IncomeIncomeSales — Counter, Sales — Online, Other Income
Cost of GoodsExpenseCOGS — Counter, Damaged Stock
Operating ExpenseExpenseRent, 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.

25

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

CodeNameTypical use
JVJournal VoucherFree-form correction or adjustment.
RVReceipt VoucherCash received — POS day-end, customer payment.
PVPayment VoucherCash paid — supplier voucher, expense.
CVContra VoucherBank-to-cash, cash-to-bank.
BVBank VoucherCard settlement, bank charges.

25.2 Posting a journal

  1. Open Accounts → Journal. Click New.
  2. Header: Date, VoucherType, ReferenceNo, Narration, PaymentMode.
  3. Add detail rows — each Ledger × Debit / Credit. The footer shows the running totals; Save is disabled until they match.
  4. SP Accounts_Transaction_Insert writes the header; Accounts_TransactionDetails_Insert writes 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.

Most postings come not from manual journals but from the Accounts Gateway — see Chapter 27.
26

Accounts Reports & MGS Export

26.1 Canned reports

ReportWhat it shows
Balance SheetAsset / Liability / Equity grouped by category as of a date.
Cash BookDate-range view of receipts / payments by ledger.
Top ExpensesTop-N expense ledgers by amount.
Monthly TrendsLast 12 months — Receipt count / Payment count / totals.
Trial BalanceAll ledgers' debit / credit at as-of date.
Aged ReceivablesCustomer balances bucketed 0–30 / 31–60 / 61–90 / 90+.
Aged PayablesSupplier 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.
Phase 5 entities: AccountMaster, DomainAccountMaster, BankChargeDetails, ChequeDetails, DomainLedger, LedgerBalance, SubLedger — covered by AccountsPhase5Controllers.
27

Accounts Gateway — Cross-Module Posting

Bridge

The 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

SPTriggered byEffect
Payments_AccountsGateWay_Customer_InsertPOS sale, Customer invoice payment, Reservation invoice payment.Inserts a candidate Customer-side ledger entry.
Payments_AccountsGateWay_Supplier_InsertSupplier voucher payment, Purchase bill settlement.Inserts a candidate Supplier-side ledger entry.
Payments_AccountsGateWay_ListActionItems_SelectAccountant opens the Gateway page.Returns the queue of unposted candidates.

27.2 The Gateway page

Accounts → Accounts Gateway
SLBooking RefTypeCustomer / SupplierNetComm.SellPostedAction
1POS-20260510-0042POS SaleWalk-in #042259.882026-05-10 14:32Post
2BILL-2026-0089Supplier BillABC Trading4,1802026-05-10 11:14Post
3INV-2026-0312Customer InvoiceGreenfield Hospital15,4002026-05-10 09:55Post

27.3 The post action

  1. Accountant clicks Post. The Gateway candidate is wrapped in an Accounts_Transaction with the appropriate VoucherType (RV for customer, PV for supplier).
  2. Detail rows are produced: e.g. customer payment → Cash Dr 259.88 / Sales Cr 247.50 / Tax Cr 11.88.
  3. The Gateway row is marked Posted with the new TransactionID.
  4. Released to Accounts_ReleaseLog for audit.
The Gateway is the only path operational modules use to reach the GL. If a posting is missing, look here first — it's likely a candidate that wasn't posted yet.
28

Status & Notification Reference

Every long-lived row carries a status. This chapter is a quick-look table.

EntityStatuses
AssetItemActive Under Audit Discrepancy Recommend Disposal Disposed
PORDraft Submitted Approved Quoted Ordered Cancelled
PODraft Active Invoiced Delivered Closed Cancelled
DeliveryPending In Transit Received Verified Returned
POS_SessionOpen Closed
POS_SaleCompleted Voided Pending
StoreEntryPending Received Cancelled
StoreAuditingPending Approved Rejected Flagged
Damaged StockPending Approved Disposed
Accounts_TransactionPending 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.
29

Troubleshooting

29.1 Top issues

SymptomLikely causeFix
"Cannot Open Session" on POSPrevious 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 ledgerAccounts Gateway candidate not posted.Open Accounts → Gateway; click Post.
Asset value report shows zeroAssetValueMonitor not seeded; or all events used raw inserts.Run AssetValueMonitor_Insert to seed; redo cost entries through SPs.
Vendor quote not visible in CompareVendor 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 blockedOpen 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.
The ActivityLog records every Insert / Update / Delete with userid + timestamp — your first stop when something looks wrong.
30

Glossary

TermMeaning
PORPurchase Order Request — the formal departmental ask before quotes are invited.
POPurchase Order — the legal commitment to buy from a chosen vendor.
PWOPurchase Work Order — internal execution doc derived from a PO.
GRNGoods Received Note — the acknowledgement that goods arrived; in this system, the equivalent is a Delivery row + an auto-created StoreEntry.
StoreEntry / StoreExitThe two journal-style rows that change StockAtStore.
StockAtStoreThe per-(Store × Item) live stock snapshot.
POS_SessionOne day's-work-on-a-till — Open → Sales → Close.
Z-ReportPer-session daily summary printed at session close.
Multi-tenderA sale paid with more than one payment method.
AssetValueMonitorPer-period book value snapshot for an asset.
HiredItemRented asset — parallel hierarchy to AssetItem.
Voucher (RV / PV / JV / CV / BV)Receipt / Payment / Journal / Contra / Bank — the five voucher types in Accounts.
Accounts GatewayThe bridge that posts operational events into the GL.
SubLedgerA customer or supplier sitting under a control account (Receivables / Payables).
MGS ExportThe pipeline that releases posted transactions to an external GL or BI tool.
Workflow ListenerThe UM-side engine that propagates approvals across modules.
SP-drivenThe architecture rule — every read & write goes through a stored procedure, never raw SQL or LINQ.
RBACRole-Based Access Control — UserRolePrivileges × SubMenu × PagePrivilegeTypes.
SignalRThe transport that powers Blazor's live UI updates — dispatch boards, dashboards, audit screens.
End of Manual. Now apply it — head to the Exercise Workbook for 15 hands-on labs.