Skip to content

Sales and Commission Reports

Backlog fieldValue
Story IDAP-SAL-008
EpicSales
Story typeReport
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 sales managers, I want to review invoice, item profitability, target, and commission results so that sales performance and incentives can be validated.

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.

Business rules

Required

Date/period and authorized sales scope are required.

Optional or conditional

Invoice/item/customer/salesperson/team/status, profitability, target, and branch filters are optional.

Action behavior

Reports are read-only and use posted/reconciled data according to each metric definition.

Blocking rule or downstream effect

Commission/target totals must expose inclusion, return, tax, discount, and payment rules.

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
salesman-target&commission-reportCommissionSummaryReportComponentReport/printNo route-level permission/guard found in source windowFeature token matchapps/sales/src/app/remote-entry/reports/reports.module.ts:76

Observed frontend fields and validation

ComponentControlObserved frontend ruleComponent source
CommissionSummaryReportComponentFromDateVisible control; optional or API-dependentapps/sales/src/app/remote-entry/reports/pages/commission-summary-report/commission-summary-report.component.ts
CommissionSummaryReportComponentSalesManIdsVisible control; optional or API-dependentapps/sales/src/app/remote-entry/reports/pages/commission-summary-report/commission-summary-report.component.ts
CommissionSummaryReportComponentToDateVisible control; optional or API-dependentapps/sales/src/app/remote-entry/reports/pages/commission-summary-report/commission-summary-report.component.ts

Observed frontend actions

ComponentClick action/handlerBusiness review requirementComponent source
CommissionSummaryReportComponentonPrintGenerate the printout for the selected record and authorized branch/tenant; use posted/current values and surface print, template, ZATCA/ETA, or popup failures without changing transaction state.apps/sales/src/app/remote-entry/reports/pages/commission-summary-report/commission-summary-report.component.ts
CommissionSummaryReportComponentonVeiwOpen 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/reports/pages/commission-summary-report/commission-summary-report.component.ts
CommissionSummaryReportComponentviewDataOpen 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/reports/pages/commission-summary-report/commission-summary-report.component.ts

Page-specific frontend acceptance criteria

  1. salesman-target&commission-report - Report/print: Expose documented filters, validation, empty/loading/error states, authorized results, totals, drill-through, print, and export behavior where present. Security observed: No route-level permission/guard found in source window

Internal Documentation — Microtec