Skip to content

Opening Balance Journals

Backlog fieldValue
Story IDAP-ACC-008
EpicAccounting
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 implementation accountants, I want to load and post starting account balances so that the ledger begins from an approved baseline.

Posting reference: AppsPortal Posting Ledger explains debit/credit construction. Delegation and Interaction Contracts explains module ownership, delegated commands, linked records, commit boundaries, and reversal propagation.

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.

Posting details

  1. Validate Draft state, opening date/period, active posting accounts, currencies, account nature, and balanced local debits/credits.
  2. Accounting posts the opening journal directly; no stock or payment delegate is called.
  3. The journal establishes opening GL balances and supplies linked lines used by Customer and Vendor Opening Balance validation.
  4. Unpost is allowed only in an open period and when later posted dependent journals/subledger activity do not exist.
  5. No opening effect is partially removed: status and ledger availability change together.

General ledger posting

ComponentDebitCreditRule
Opening linesSelected opening debit accountsSelected opening credit accountsLocal debits must equal local credits; accounts active/postable.

Other module and document effects

AreaEffectConditional/no effect
Customer/Vendor openingsSupplies linkable GL lines used to validate their subledger opening amounts/nature.Does not automatically create customer/vendor opening documents.
Inventory/FinanceNo stock quantity or bank/treasury movement.Inventory opening is separate.
Accounting reportsEstablishes opening GL balances.Draft lines have no ledger effect.

Core acceptance scenarios

  1. Given a balanced Draft opening journal in the permitted opening period, when an authorized accountant posts it, then the opening ledger baseline becomes effective and linked customer/vendor opening balances can validate against its lines.
  2. Given later posted dependent activity exists, when the operation is attempted, then Unpost is rejected and the baseline remains effective.
  3. Given the same Post request is retried after success, when the source is no longer Draft, then no duplicate journal, stock, balance, payment, or lifecycle effect is created.

Business rules

Opening-balance journals require an opening period/date, valid accounts/currencies, debit/credit nature and amounts, and a balanced journal. Post makes the baseline effective in the ledger. Unpost requires an open period and is blocked when later posted journals depend on the opening baseline. Unpost removes the opening effect without deleting its audit identity.

Customer and Vendor Opening Balances are linked to opening journal lines. Their total and net account nature must match the linked journal amount before their own Post can succeed.

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
(module default)JournalEntryOpeningBalanceListComponentList/navigationPermission: AppAccountingPermissions.OpeningBalanceJournalEntries_Add; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/accounting/src/app/remote-entry/journal-entry/journal-entry.module.ts:151
addAddJournalEntryOpeningBalanceComponentAddPermission: AppAccountingPermissions.OpeningBalanceJournalEntries_Add; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/accounting/src/app/remote-entry/journal-entry/journal-entry.module.ts:158
edit/:idEditJournalEntryOpeningBalanceComponentEditPermission: AppAccountingPermissions.OpeningBalanceJournalEntries_Edit; Guards: PolicyAuthGuard, preventPostedGuardExplicit frontend feature ruleapps/accounting/src/app/remote-entry/journal-entry/journal-entry.module.ts:168
journal-entry-opening-balanceMainOpeningBalanceComponentList/navigationPermission: AppAccountingPermissions.OpeningBalanceJournalEntries_List; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/accounting/src/app/remote-entry/journal-entry/journal-entry.module.ts:141
view/:idViewJournalEntryOpeningBalanceComponentView/detailPermission: AppAccountingPermissions.OpeningBalanceJournalEntries_View; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/accounting/src/app/remote-entry/journal-entry/journal-entry.module.ts:179

Observed frontend fields and validation

ComponentControlObserved frontend ruleComponent source
AddJournalEntryOpeningBalanceComponentaccountVisible control; optional or API-dependentapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentcreditAmountVisible control; optional or API-dependentapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentcurrencyVisible control; optional or API-dependentapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentcurrencyRateVisible control; optional or API-dependentapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentdebitAmountVisible control; optional or API-dependentapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentdescriptionRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentjournalDateRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentlineDescriptionVisible control; optional or API-dependentapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentrefrenceNumberRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentaccountIdRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentcreditAmountRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentcurrencyRateRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentdebitAmountRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentdescriptionRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentjournalDateRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentlineDescriptionRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentreferenceNumberRequired in component validatorapps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts

Observed frontend actions

ComponentClick action/handlerBusiness review requirementComponent source
AddJournalEntryOpeningBalanceComponentaddThingDocument 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/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentdeleteLineAvailable 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/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentopenCostPopupDocument 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/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentopenDialogOpen the item/lookup/tracking dialog with the current warehouse, item, UOM, and remaining quantity context; accepted values must return to the correct line and cancel must not mutate it.apps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentrouteToJournalNavigate 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/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
AddJournalEntryOpeningBalanceComponentsaveValidate 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/journal-entry/pages/journal-entry-opening-balance/add-journal-entry-opening-balance/add-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentaddNewRowAdd one initialized detail row without changing existing rows; apply defaults and line validators, preserve stable row identity, and exclude incomplete rows from Save/Post.apps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentdeleteJournalEntryLineAvailable 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/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentopenCostPopupDocument 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/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
EditJournalEntryOpeningBalanceComponentopenDialogOpen the item/lookup/tracking dialog with the current warehouse, item, UOM, and remaining quantity context; accepted values must return to the correct line and cancel must not mutate it.apps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/edit-journal-entry-opening-balance/edit-journal-entry-opening-balance.component.ts
JournalEntryOpeningBalanceListComponentonEditOpen 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/journal-entry/pages/journal-entry-opening-balance/journal-entry-opening-balance-list/journal-entry-opening-balance-list.component.ts
JournalEntryOpeningBalanceListComponentonPostAvailable only for a postable Draft and Post permission; confirm the document, prevent a second submission, call the posting API, and refresh status, journal/stock links, and row actions. Failure must keep the pre-post state.apps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/journal-entry-opening-balance-list/journal-entry-opening-balance-list.component.ts
JournalEntryOpeningBalanceListComponentonUnPostAvailable only for a postable Draft and Post permission; confirm the document, prevent a second submission, call the posting API, and refresh status, journal/stock links, and row actions. Failure must keep the pre-post state.apps/accounting/src/app/remote-entry/journal-entry/pages/journal-entry-opening-balance/journal-entry-opening-balance-list/journal-entry-opening-balance-list.component.ts
JournalEntryOpeningBalanceListComponentonViewOpen 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/journal-entry/pages/journal-entry-opening-balance/journal-entry-opening-balance-list/journal-entry-opening-balance-list.component.ts
JournalEntryOpeningBalanceListComponentprintoutGenerate 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/journal-entry-opening-balance/journal-entry-opening-balance-list/journal-entry-opening-balance-list.component.ts
ViewJournalEntryOpeningBalanceComponentopenCostPopupDocument 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/journal-entry-opening-balance/view-journal-entry-opening-balance/view-journal-entry-opening-balance.component.ts

Page-specific frontend acceptance criteria

  1. (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.OpeningBalanceJournalEntries_Add; Guards: PolicyAuthGuard
  2. add - Add: Render permitted fields, required indicators, defaults, dependent lookups, validation, Save/Cancel, loading, success, and API-error states. Security observed: Permission: AppAccountingPermissions.OpeningBalanceJournalEntries_Add; Guards: PolicyAuthGuard
  3. edit/:id - Edit: Load the identified record, enforce state/permission field locks, preserve concurrency identity, validate changes, and return without losing filters. Security observed: Permission: AppAccountingPermissions.OpeningBalanceJournalEntries_Edit; Guards: PolicyAuthGuard, preventPostedGuard
  4. journal-entry-opening-balance - 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.OpeningBalanceJournalEntries_List; Guards: PolicyAuthGuard
  5. view/:id - View/detail: Load an authorized immutable/detail representation with status-aware actions, linked records, print/export where exposed, and not-found/forbidden handling. Security observed: Permission: AppAccountingPermissions.OpeningBalanceJournalEntries_View; Guards: PolicyAuthGuard

Internal Documentation — Microtec