Case study 05 / 05

Custom Business System

Outlet Control

POS, Inventory & Financial Operations System

Year
2026
Type
Custom Business Software
Status
MVP Completed
Role
Sole Software Engineer — Backend & Business Systems
ASP.NET CoreBlazorEF CorePOSInventoryAccounting Logic

01

Overview

Outlet Control is a complete retail outlet operations platform connecting POS sales, inventory, supplier receiving, treasury, supplier debt, cashier shifts, and profitability in one controlled business workflow.

02

Context

A retail outlet receives stock from the company, sells products for cash, manages cashier shifts, tracks inventory, pays the supplier, and needs visibility over both stock and money. A simple POS solves only one small part of that.

The real challenge is keeping every step consistent — Outlet Control was designed around that full lifecycle.

Goods → Inventory → Sales → Cash → Treasury → Supplier Debt → Profit

03

The Problem

The outlet needed answers that can't be maintained correctly if each function operates independently:

  • What stock entered the outlet — and what was actually received?
  • Was there a shortage in the supplier delivery?
  • What is in stock, what was sold, and what did it really cost?
  • What is the gross profit?
  • How much cash should the cashier have — shortage or surplus at closing?
  • How much does the outlet owe the supplier?
  • What money is actually available in treasury?

04

What I Built

A connected system where inventory and financial events affect each other according to explicit business rules.

Authentication & Roles

Admin handles setup such as opening-stock initialization. Owner sees business and financial information. Cashier runs daily operations without seeing inventory cost or profitability.

POS

Categories, product images and cards, cart, quantity adjustment, cash confirmation, and automatic totals. Sales are blocked when stock is insufficient and require an active cashier shift.

Inventory & Opening Stock

Total units, stocked products, low-stock indicators, and cost/retail inventory value (hidden from cashiers). Admins initialize opening stock with quantity and unit cost — blocked for products that already have operational movement, so the cost basis stays valid.

Weighted Average Cost

Receiving recalculates inventory cost using weighted-average costing, keeping a meaningful cost per unit when supplier prices change between deliveries.

Stock Movements

Every inventory event — Opening Balance, Receiving, Sale, Return, Adjustment — creates a traceable movement with product, category, date, type, signed quantity, and notes.

Supplier Invoice Workflow

The owner records the invoice (Pending — no stock change). The cashier confirms physical receiving line by line. Only then does inventory change, using the actual received quantity. Differences produce a Received With Variance status with quantity and monetary difference, keeping physical stock separate from the supplier accounting decision.

Owner creates invoice → Cashier confirms receiving → Inventory updated

Supplier Account, Payments & Adjustments

A supplier ledger tracks invoices, payments, adjustments, and current debt. A payment reduces both debt and treasury, and can't exceed either. An adjustment (e.g. an approved shortage) reduces debt only, never treasury, and requires a reason.

Current Debt = Supplier Invoices − Payments − Adjustments

Treasury

A dedicated ledger — Cash In, Cash Out, Expense, Supplier Payment, Shift Opening, Shift Settlement — computes the real balance and blocks outgoing movements when funds are insufficient.

Daily Shift Management

One active shift at a time. Opening cash moves from treasury to the drawer (never more than treasury holds). On closing, the cashier enters actual cash; the result is Matched, Surplus, or Shortage, and any difference requires an explanation. Actual cash returns to treasury through a system-generated settlement.

Expected Cash = Opening Cash + Shift Sales · Difference = Actual − Expected

Sales History & Profitability

Number of sales, revenue, COGS, gross profit, and margin %, with per-sale breakdown of quantity, price, cost, and profit. An owner dashboard brings sales, expected cash, supplier debt, stock, treasury, profitability, and inventory value together. Supplier receipts export to Excel with variances.

05

Architecture & Engineering

The solution is split into Domain, Application, Contracts, Infrastructure, API, and Web.

  • Domain-oriented business rules
  • EF Core transactions
  • Optimistic concurrency handling
  • DTO contracts
  • Role-based authorization
  • Financial validation
  • Inventory audit trail
  • Separation of financial and physical-stock events

Historical Cost Integrity

When a product is sold, its current cost is copied onto the sale item and frozen, so future cost changes never rewrite historical COGS or profit.

Sale Idempotency

Sales carry a client reference identifier, preventing duplicate sales when a request is repeated due to network or client behavior.

Concurrency Protection

Stock updates during sales detect conflicting concurrent modifications instead of silently corrupting balances.

06

Technical Challenge

The key challenge was keeping modules consistent when they represent different sides of the same business event.

Receiving: an invoice may say one quantity while the cashier receives another — supplier liability, physical inventory, inventory cost, and delivery variance must be separated. A supplier payment changes debt and treasury; an adjustment changes debt only. Shift closing must distinguish sales value, expected cash, actual cash, difference, and treasury settlement.

These rules live at the service/domain level, so financial consistency never depends on the user interface.

07

Business Impact

Outlet Control replaces several disconnected operational records with one consistent workflow, giving visibility from the moment goods arrive until they are sold and the resulting cash is reconciled.

Inventory · Sales · Cash · Supplier Debt · Profitability

08

My Role

Responsible for the complete product:

  • Business analysis
  • Workflow design
  • Domain modeling
  • Database design
  • Backend architecture
  • API development
  • POS workflow
  • Inventory logic
  • Weighted-average costing
  • Supplier accounting
  • Treasury
  • Cashier shifts
  • Authorization
  • UI implementation
  • Testing
  • Deployment preparation

09

Technology Stack

C#ASP.NET CoreEntity Framework CoreSQL ServerBlazor WebAssemblyASP.NET IdentityJWT AuthenticationREST APIsClosedXMLRole-Based AuthorizationTransactionsOptimistic ConcurrencyGit

Source code: private repository

Next case study →

Sellora

Retail Inventory & Serialized Sales Platform