Appearance
Vendor and Purchase Reports
| Backlog field | Value |
|---|---|
| Story ID | AP-PUR-007 |
| Epic | Purchase |
| 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 purchasing managers, I want to review vendor balances, statements, and purchase invoice activity so that supplier exposure and purchasing history can be analyzed.
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/as-of period and report-specific vendor scope are required as applicable.
Optional or conditional
Vendor/category, document/status, currency, aging bucket, and branch are optional filters.
Action behavior
Reports are read-only; statements/balances use posted invoices, returns, payments, openings, and reconciliations.
Blocking rule or downstream effect
Opening plus movements must equal closing balance under identical filters.
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/purchase/src/app/remote-entry/entry.routes.ts:30 |
| vendor-balance-report | VendorBalanceReportComponent | Report/print | No route-level permission/guard found in source window | Feature token match | apps/purchase/src/app/remote-entry/report/report.module.ts:22 |
| vendor-category | MainVendorCategoryComponent | List/navigation | Permission: AppPurchasePermissions.VendorCategory_List; Guards: AuthGuard | Feature token match | apps/purchase/src/app/remote-entry/purchase/purchase.module.ts:29 |
| vendor-definitions | MainVendorDefintionsComponent | List/navigation | Permission: AppPurchasePermissions.Vendor_List; Guards: AuthGuard | Feature token match | apps/purchase/src/app/remote-entry/purchase/purchase.module.ts:77 |
| vendor-reports | VendorReportComponent | Report/print | No route-level permission/guard found in source window | Feature token match | apps/purchase/src/app/remote-entry/report/report.module.ts:14 |
Observed frontend fields and validation
| Component | Control | Observed frontend rule | Component source |
|---|---|---|---|
| VendorBalanceReportComponent | FromDate | Required in component validator | apps/purchase/src/app/remote-entry/report/pages/vendor-balance-report/vendor-balance-report.component.ts |
| VendorBalanceReportComponent | ToDate | Required in component validator | apps/purchase/src/app/remote-entry/report/pages/vendor-balance-report/vendor-balance-report.component.ts |
| VendorBalanceReportComponent | VendorIds | Required in component validator | apps/purchase/src/app/remote-entry/report/pages/vendor-balance-report/vendor-balance-report.component.ts |
| VendorReportComponent | fromDate | Required in component validator | apps/purchase/src/app/remote-entry/report/components/vendor-report/vendor-report.component.ts |
| VendorReportComponent | toDate | Required in component validator | apps/purchase/src/app/remote-entry/report/components/vendor-report/vendor-report.component.ts |
| VendorReportComponent | vendorId | Required in component validator | apps/purchase/src/app/remote-entry/report/components/vendor-report/vendor-report.component.ts |
Observed frontend actions
| Component | Click action/handler | Business review requirement | Component source |
|---|---|---|---|
| VendorBalanceReportComponent | onRouteToVendor | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/purchase/src/app/remote-entry/report/pages/vendor-balance-report/vendor-balance-report.component.ts |
| VendorBalanceReportComponent | printTable | Generate 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/purchase/src/app/remote-entry/report/pages/vendor-balance-report/vendor-balance-report.component.ts |
| VendorBalanceReportComponent | viewData | 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/purchase/src/app/remote-entry/report/pages/vendor-balance-report/vendor-balance-report.component.ts |
| VendorBalanceReportComponent | viewStatement | 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/purchase/src/app/remote-entry/report/pages/vendor-balance-report/vendor-balance-report.component.ts |
| VendorReportComponent | 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/purchase/src/app/remote-entry/report/components/vendor-report/vendor-report.component.ts |
| VendorReportComponent | onRouteToTransaction | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/purchase/src/app/remote-entry/report/components/vendor-report/vendor-report.component.ts |
| VendorReportComponent | printTable | Generate 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/purchase/src/app/remote-entry/report/components/vendor-report/vendor-report.component.ts |
| VendorReportComponent | viewData | 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/purchase/src/app/remote-entry/report/components/vendor-report/vendor-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
- vendor-balance-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
- vendor-category - 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: AppPurchasePermissions.VendorCategory_List; Guards: AuthGuard
- vendor-definitions - 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: AppPurchasePermissions.Vendor_List; Guards: AuthGuard
- vendor-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