Appearance
Cost Center Reports
| Backlog field | Value |
|---|---|
| Story ID | AP-ACC-003 |
| Epic | Accounting |
| 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 management accountants, I want to analyze balances and income by cost center so that operational responsibility can be evaluated.
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 at least one authorized cost-center/account scope are required by the selected report.
Optional or conditional
Hierarchy depth, comparison, account and branch filters are optional.
Action behavior
View/Print/Export are read-only and use journal cost-center allocations.
Blocking rule or downstream effect
Unallocated journal values are included/excluded only by explicit report policy.
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 |
|---|---|---|---|---|---|
| cost-center | CostCenterReportComponent | Report/print | Permission: AppAccountingPermissions.CostCenterReports_ReportView; Guards: PolicyAuthGuard | Feature token match | apps/accounting/src/app/remote-entry/journal-entry/journal-entry.module.ts:120 |
| cost-center | MainCostCenterComponent | List/navigation | Permission: AppAccountingPermissions.CostCenters_List; Guards: PolicyAuthGuard | Feature token match | apps/accounting/src/app/remote-entry/account/account.module.ts:69 |
| cost-center-income-statement | CostCenterIncomeStatmentComponent | List/navigation | No route-level permission/guard found in source window | Feature token match | apps/accounting/src/app/remote-entry/report/report-routing.module.ts:26 |
| reports | Lazy-loaded route | Report/print | No route-level permission/guard found in source window | Feature token match | apps/accounting/src/app/remote-entry/entry.routes.ts:30 |
Observed frontend fields and validation
| Component | Control | Observed frontend rule | Component source |
|---|---|---|---|
| CostCenterIncomeStatmentComponent | costCenterId | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/report/pages/cost-center-income-statment/cost-center-income-statment.component.ts |
| CostCenterIncomeStatmentComponent | FromDate | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/report/pages/cost-center-income-statment/cost-center-income-statment.component.ts |
| CostCenterIncomeStatmentComponent | ToDate | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/report/pages/cost-center-income-statment/cost-center-income-statment.component.ts |
| CostCenterReportComponent | costCenters | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/journal-entry/pages/report/cost-center-report/cost-center-report.component.ts |
| CostCenterReportComponent | dateFrom | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/journal-entry/pages/report/cost-center-report/cost-center-report.component.ts |
| CostCenterReportComponent | dateTo | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/journal-entry/pages/report/cost-center-report/cost-center-report.component.ts |
| CostCenterReportComponent | glAccounts | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/journal-entry/pages/report/cost-center-report/cost-center-report.component.ts |
| CostCenterReportComponent | posted | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/journal-entry/pages/report/cost-center-report/cost-center-report.component.ts |
| CostCenterReportComponent | unposted | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/journal-entry/pages/report/cost-center-report/cost-center-report.component.ts |
Observed frontend actions
| Component | Click action/handler | Business review requirement | Component source |
|---|---|---|---|
| CostCenterIncomeStatmentComponent | onVeiw | 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/accounting/src/app/remote-entry/report/pages/cost-center-income-statment/cost-center-income-statment.component.ts |
| CostCenterIncomeStatmentComponent | 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/accounting/src/app/remote-entry/report/pages/cost-center-income-statment/cost-center-income-statment.component.ts |
| CostCenterReportComponent | getCostCenterReports | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/accounting/src/app/remote-entry/journal-entry/pages/report/cost-center-report/cost-center-report.component.ts |
| CostCenterReportComponent | 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/accounting/src/app/remote-entry/journal-entry/pages/report/cost-center-report/cost-center-report.component.ts |
| CostCenterTreeComponent | addChild | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/accounting/src/app/remote-entry/account/pages/cost-center/cost-center-tree/cost-center-tree.component.ts |
| CostCenterTreeComponent | deleteCost | Available only in deletable states with Delete permission; identify the record in confirmation, call delete once, remove/refresh the list row on success, and retain the row with the API reason on failure. | apps/accounting/src/app/remote-entry/account/pages/cost-center/cost-center-tree/cost-center-tree.component.ts |
| CostCenterTreeComponent | editAccount | Open the identified editable record only with Edit permission; posted/locked records remain blocked by route or action state and list context must be recoverable on return. | apps/accounting/src/app/remote-entry/account/pages/cost-center/cost-center-tree/cost-center-tree.component.ts |
| CostCenterTreeComponent | handleTabClick | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/accounting/src/app/remote-entry/account/pages/cost-center/cost-center-tree/cost-center-tree.component.ts |
| CostCenterTreeComponent | newChild | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/accounting/src/app/remote-entry/account/pages/cost-center/cost-center-tree/cost-center-tree.component.ts |
| CostCenterTreeComponent | toggelTree | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/accounting/src/app/remote-entry/account/pages/cost-center/cost-center-tree/cost-center-tree.component.ts |
Page-specific frontend acceptance criteria
- cost-center - 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: AppAccountingPermissions.CostCenters_List; Guards: PolicyAuthGuard
- cost-center - Report/print: Expose documented filters, validation, empty/loading/error states, authorized results, totals, drill-through, print, and export behavior where present. Security observed: Permission: AppAccountingPermissions.CostCenterReports_ReportView; Guards: PolicyAuthGuard
- cost-center-income-statement - 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: No route-level permission/guard found in source window
- 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