Skip to content

Point of Sale

Backlog fieldValue
Story IDAP-SAL-006
EpicSales
Story typeBusiness workflow
Review statusDraft - business analyst and business owner review required
Source evidenceAppsPortal.Apis controller, application command/query handlers, validators, domain entities, and matching MFE workflow where available
Last source review2026-07-10

User story

As cashiers, I want to open sessions and issue or return POS invoices so that cash and stock remain tied to the responsible session.

Posting reference: AppsPortal Posting Ledger explains debit/credit construction. Delegation and Interaction Contracts explains module ownership, delegated commands, linked records, commit boundaries, and reversal propagation.

Acceptance criteria

  1. Only authorized users can view or execute the feature's actions.
  2. Required business data, active dependencies, tenant/branch scope, and current document state are validated.
  3. Invalid requests return actionable validation errors without applying a partial change.
  4. Search, list, view, print, and export operations use the same authorized business scope.
  5. Material create, edit, status, approval, posting, reversal, and integration actions are auditable where applicable.
  6. Financial or stock effects are applied atomically and no more than once.

Posting details

  1. POS Session Post is an orchestration transaction over all eligible session sales, returns, receipts, and refunds.
  2. Validate the session is not already Posted, branch/device/user context, selected treasury, child documents, stock, payment methods, accounts, and period.
  3. Delegate session Stock Out and Stock In to Inventory; delegate Payment In and Payment Out to Finance; each delegate creates its own linked journals/subledger effects.
  4. Store/retain the child links and mark the POS Session Posted only after every category succeeds.
  5. The session is the commit boundary: one failed child prevents partial stock, cash, or session closure.

General ledger posting

Child transactionDebitCreditCondition
SaleReceivable/cash and COGSRevenue/tax and Warehouse GLUses Sales Invoice plus Stock Out for storable items.
ReturnSales Return/tax reversal and Warehouse GLReceivable/refund and COGSStock In only for storable items.
Receipt/refundBank/Treasury or party accountParty account or Bank/TreasuryDelegated Payment In/Out.
Service sale/returnCommercial accounts onlyCommercial accounts onlyNo Stock Out/In.

Other module and document effects

AreaEffectConditional/no effect
InventoryDelegates Stock Out for sold storable items and Stock In for returned storable items.Services do not affect inventory.
FinanceDelegates receipts/refunds and updates treasury/bank transactions.Non-cash/unpaid child documents follow their own payment rules.
SessionStores all child links and closes only after every child commits.Any child failure leaves session unposted.

Core acceptance scenarios

  1. Given an open POS session whose child sales/returns and selected treasury are valid, when the authorized user closes/posts the session, then delegated Stock In, Stock Out, Payment In, and Payment Out effects commit before the session becomes Posted.
  2. Given one child category fails validation, when the operation is attempted, then the session and all delegated batch effects remain unposted.
  3. Given the same Post request is retried after success, when the source is no longer Draft, then no duplicate journal, stock, balance, payment, or lifecycle effect is created.

Business rules

Required

Open session, authorized branch/device/user, treasury/payment methods, warehouse, and valid sale/return lines are required.

Optional or conditional

Customer, discount, tax exemptions, notes, and mixed methods are conditional.

Action behavior

Posting a session batches linked Stock In/Out and Payment In/Out, marks session Posted, and commits atomically.

Blocking rule or downstream effect

Session close fails when linked documents, cash reconciliation, stock, accounts, or period are invalid.

Frontend page coverage

The following UI coverage is sourced from the pulled MFE route configuration. A Module-level supporting artifact mapping is evidence of a reachable screen, but requires BA confirmation that it belongs to this story rather than a more specific feature story.

Route/pageComponentModeRoute permission/guardMapping confidenceSource
(module default)PosSalesInvoiceComponentList/navigationPermission: AppSalesPermissions.POSSalesInvoice_List; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:100
(module default)ReturnPosSalesInvoiceComponentList/navigationPermission: AppSalesPermissions.POSReturnSalesInvoice_List; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:136
pos-return-sales-invoiceMainReturnPosSalesInvoiceComponentList/navigationPermission: AppSalesPermissions.POSReturnSalesInvoice_List; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:126
pos-sales-invoiceMainPosSalesInvoiceComponentList/navigationPermission: AppSalesPermissions.POSSalesInvoice_List; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:90
view/:idReturnPosSalesInvoiceViewComponentView/detailPermission: AppSalesPermissions.POSReturnSalesInvoice_View; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:148
view/:idViewPosSalesInvoiceComponentView/detailPermission: AppSalesPermissions.POSSalesInvoice_View; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:112

Observed frontend fields and validation

ComponentControlObserved frontend ruleComponent source
--No reactive formControlName controls were found for the routed components; review template-driven/shared child components.Route sources above

Observed frontend actions

ComponentClick action/handlerBusiness review requirementComponent source
PosSalesInvoiceComponentonViewOpen the authorized record in view mode with its status, totals, lines, source and generated-document links; handle deleted, forbidden, and missing records without exposing stale data.apps/sales/src/app/remote-entry/transaction/pages/pos-sales-invoice/pos-sales-invoice-list/pos-sales-invoice.component.ts
ReturnPosSalesInvoiceComponentonViewOpen the authorized record in view mode with its status, totals, lines, source and generated-document links; handle deleted, forbidden, and missing records without exposing stale data.apps/sales/src/app/remote-entry/transaction/pages/return-pos-sales-invoice/return-pos-sales-invoice-list/return-pos-sales-invoice.component.ts

Page-specific frontend acceptance criteria

  1. (module default) - List/navigation: Load an authorized paged/searchable list or navigation page; preserve filters/sort/paging and expose only permitted row and bulk actions. Security observed: Permission: AppSalesPermissions.POSReturnSalesInvoice_List; Guards: PolicyAuthGuard
  2. pos-return-sales-invoice - List/navigation: Load an authorized paged/searchable list or navigation page; preserve filters/sort/paging and expose only permitted row and bulk actions. Security observed: Permission: AppSalesPermissions.POSReturnSalesInvoice_List; Guards: PolicyAuthGuard
  3. pos-sales-invoice - List/navigation: Load an authorized paged/searchable list or navigation page; preserve filters/sort/paging and expose only permitted row and bulk actions. Security observed: Permission: AppSalesPermissions.POSSalesInvoice_List; Guards: PolicyAuthGuard
  4. view/:id - View/detail: Load an authorized immutable/detail representation with status-aware actions, linked records, print/export where exposed, and not-found/forbidden handling. Security observed: Permission: AppSalesPermissions.POSSalesInvoice_View; Guards: PolicyAuthGuard

Internal Documentation — Microtec