Appearance
Journal Entry Templates
| Backlog field | Value |
|---|---|
| Story ID | AP-ACC-007 |
| Epic | Accounting |
| Story type | Master data / configuration |
| 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 accountants, I want to reuse controlled journal structures so that recurring entries are faster and consistent.
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
Template name/type and at least one balanced template structure are required.
Optional or conditional
Default descriptions, amounts, accounts, currencies, and cost centers may be optional placeholders where the page permits.
Action behavior
Using a template copies values into a Draft journal; it does not post automatically.
Blocking rule or downstream effect
Inactive/deleted templates do not alter journals previously created from them.
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 |
|---|---|---|---|---|---|
| (module default) | AccountingDashboardComponent | Dashboard | No route-level permission/guard found in source window | Feature token match | apps/accounting/src/app/remote-entry/dashboard/dashboard.module.ts:10 |
| (module default) | LayoutPageComponent | List/navigation | No route-level permission/guard found in source window | Feature token match | apps/accounting/src/app/remote-entry/entry.routes.ts:6 |
| (module default) | MainChartOfAccountComponent | List/navigation | Permission: AppAccountingPermissions.ChartOfAccounts_List; Guards: PolicyAuthGuard | Feature token match | apps/accounting/src/app/remote-entry/account/account.module.ts:39 |
| add | AddChartComponent | Add | Permission: AppAccountingPermissions.ChartOfAccounts_Add; Guards: PolicyAuthGuard | Feature token match | apps/accounting/src/app/remote-entry/account/account.module.ts:49 |
| chartofaccounts | MainComponent | List/navigation | Permission: AppAccountingPermissions.ChartOfAccounts_List; Guards: PolicyAuthGuard | Feature token match | apps/accounting/src/app/remote-entry/account/account.module.ts:30 |
| import/:errorType | ListFileComponent | Import | Permission: AppAccountingPermissions.CostCenters_List; Guards: PolicyAuthGuard | Feature token match | apps/accounting/src/app/remote-entry/account/account.module.ts:59 |
| income-statement | IncomeStatementComponent | 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:18 |
| masterdata | Lazy-loaded route | List/navigation | No route-level permission/guard found in source window | Feature token match | apps/accounting/src/app/remote-entry/entry.routes.ts:25 |
| transactions | Lazy-loaded route | List/navigation | No route-level permission/guard found in source window | Feature token match | apps/accounting/src/app/remote-entry/entry.routes.ts:18 |
Observed frontend fields and validation
| Component | Control | Observed frontend rule | Component source |
|---|---|---|---|
| AddChartComponent | accountActivation | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | accountCode | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | accountSectionId | Required in component validator | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | accountTypeId | Conditionally required/validated in component | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | costCenterConfig | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | currencyId | Conditionally required/validated in component | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | hasNoChild | Conditionally required/validated in component | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | levelId | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | name | Required in component validator | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | nameAr | Required in component validator | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | natureId | Required in component validator | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | parentId | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | periodicActiveFrom | Conditionally required/validated in component | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | periodicActiveTo | Conditionally required/validated in component | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | tags | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| HeaderReportStatementComponent | Branches | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/report/component/header-report-statement/header-report-statement.component.ts |
| HeaderReportStatementComponent | range | Required in component validator | apps/accounting/src/app/remote-entry/report/component/header-report-statement/header-report-statement.component.ts |
| HeaderReportStatementComponent | viewZeroBalance | Visible control; optional or API-dependent | apps/accounting/src/app/remote-entry/report/component/header-report-statement/header-report-statement.component.ts |
Observed frontend actions
| Component | Click action/handler | Business review requirement | Component source |
|---|---|---|---|
| AccountingDashboardComponent | reSortAccounts | 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/dashboard/pages/accounting-dashboard/accounting-dashboard.component.ts |
| AccountingDashboardComponent | reSortCostCenters | 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/dashboard/pages/accounting-dashboard/accounting-dashboard.component.ts |
| AddChartComponent | cancel | Leave or close without persisting; warn when the current form has unsaved changes and restore the prior list/filter context. | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | onSubmit | Validate the concrete form and line collection, prevent duplicate submission, persist once, show API field/business errors in context, and navigate/refresh only after success. | apps/accounting/src/app/remote-entry/account/components/add-chart/add-chart.component.ts |
| AddChartComponent | openCostAllocation | 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/components/add-chart/add-chart.component.ts |
| ChartOfAccountTreeComponent | 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/chart-of-account/chart-of-account-tree/chart-of-account-tree.component.ts |
| ChartOfAccountTreeComponent | deleteAccount | 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/chart-of-account/chart-of-account-tree/chart-of-account-tree.component.ts |
| ChartOfAccountTreeComponent | 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/chart-of-account/chart-of-account-tree/chart-of-account-tree.component.ts |
| ChartOfAccountTreeComponent | 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/chart-of-account/chart-of-account-tree/chart-of-account-tree.component.ts |
| ChartOfAccountTreeComponent | 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/chart-of-account/chart-of-account-tree/chart-of-account-tree.component.ts |
| ChartOfAccountTreeComponent | 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/chart-of-account/chart-of-account-tree/chart-of-account-tree.component.ts |
| HeaderReportStatementComponent | 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/report/component/header-report-statement/header-report-statement.component.ts |
| MainChartOfAccountComponent | editMode | 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/chart-of-account/main-chart-of-account/main-chart-of-account.component.ts |
| MainChartOfAccountComponent | RedirectToConfiguration | 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/chart-of-account/main-chart-of-account/main-chart-of-account.component.ts |
Page-specific frontend acceptance criteria
- (module default) - Dashboard: Load authorized summary values consistently with source reports, support exposed date/branch filters, and handle empty/error states. Security observed: No route-level permission/guard found in source window
- (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: AppAccountingPermissions.ChartOfAccounts_List; Guards: PolicyAuthGuard
- add - Add: Render permitted fields, required indicators, defaults, dependent lookups, validation, Save/Cancel, loading, success, and API-error states. Security observed: Permission: AppAccountingPermissions.ChartOfAccounts_Add; Guards: PolicyAuthGuard
- chartofaccounts - 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.ChartOfAccounts_List; Guards: PolicyAuthGuard
- import/:errorType - Import: Provide template/download and upload flow, file/type/size validation, row-level preview/errors, confirmation, duplicate policy, and partial-failure rules. Security observed: Permission: AppAccountingPermissions.CostCenters_List; Guards: PolicyAuthGuard
- 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
- masterdata - 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
- transactions - 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