Appearance
Van Sales Reports
| Backlog field | Value |
|---|---|
| Story ID | AP-VAN-005 |
| Epic | Van Sales |
| Story type | Report |
| Review status | Draft - business analyst and business owner review required |
| Source evidence | AppsPortal.Apis controller, application command/query handlers, validators, domain entities, and matching MFE workflow where available |
| Last source review | 2026-07-10 |
User story
As distribution managers, I want to review distribution sales and salesperson results so that field sales performance and transactions can be reconciled.
Acceptance criteria
- Only authorized users can view or execute the feature's actions.
- Required business data, active dependencies, tenant/branch scope, and current document state are validated.
- Invalid requests return actionable validation errors without applying a partial change.
- Search, list, view, print, and export operations use the same authorized business scope.
- Material create, edit, status, approval, posting, reversal, and integration actions are auditable where applicable.
- Financial or stock effects are applied atomically and no more than once.
Business rules
Required
Date/period and authorized field-sales scope are required.
Optional or conditional
Salesperson, customer, device, route, invoice, status, and branch filters are optional.
Action behavior
View/Print/Export are read-only and use posted/synchronized records according to report rules.
Blocking rule or downstream effect
Offline duplicates/cancelled documents must not inflate totals.
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/page | Component | Mode | Route permission/guard | Mapping confidence | Source |
|---|---|---|---|---|---|
| reports | Lazy-loaded route | Report/print | No route-level permission/guard found in source window | Feature token match | apps/distribution/src/app/remote-entry/entry.routes.ts:34 |
| sales-report | DistributionSalesReportComponent | Report/print | No route-level permission/guard found in source window | Feature token match | apps/distribution/src/app/remote-entry/reports/reports-routing.module.ts:9 |
Observed frontend fields and validation
| Component | Control | Observed frontend rule | Component source |
|---|---|---|---|
| DistributionInvoiceReportFiltersComponent | customerIds | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
| DistributionInvoiceReportFiltersComponent | deviceIds | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
| DistributionInvoiceReportFiltersComponent | fromDate | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
| DistributionInvoiceReportFiltersComponent | paymentTermIds | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
| DistributionInvoiceReportFiltersComponent | salesmanIds | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
| DistributionInvoiceReportFiltersComponent | statuses | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
| DistributionInvoiceReportFiltersComponent | toDate | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
| DistributionInvoiceReportFiltersComponent | visitIds | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
| DistributionInvoiceReportFiltersComponent | warehouseIds | Visible control; optional or API-dependent | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/components/distribution-invoice-report-filters/distribution-invoice-report-filters.component.ts |
Observed frontend actions
| Component | Click action/handler | Business review requirement | Component source |
|---|---|---|---|
| DistributionSalesReportComponent | onRouteToJournalEntry | Navigate only when a linked journal ID exists and the user can view Accounting; otherwise the action is absent/disabled and no transaction data changes. | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/distribution-sales-report.component.ts |
| DistributionSalesReportComponent | onRouteToStockOut | Navigate only when the transaction produced a linked Stock In/Stock Out record and Inventory view permission is available; service-only/no-stock cases expose no stock link. | apps/distribution/src/app/remote-entry/reports/distribution-sales-report/distribution-sales-report.component.ts |
| DistributionSalesReportComponent | onViewData | Open 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/distribution/src/app/remote-entry/reports/distribution-sales-report/distribution-sales-report.component.ts |
Page-specific frontend acceptance criteria
- reports - 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
- sales-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