Appearance
Vendor Opening Balances
| Backlog field | Value |
|---|---|
| Story ID | AP-PUR-008 |
| 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 implementation accountants, I want to load and post starting vendor balances so that payables begin 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
- 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.
Posting details
- The linked Accounting Opening Balance Journal supplies the GL entry; Vendor Opening Balance Post does not create a second journal.
- Validate Draft state, open period, vendor details, due schedule, and that detail total and net Debit/Credit nature equal the linked journal line.
- Mark the vendor opening document Posted and make payable/due balances available to statements, aging, and Payment Out.
- Commit opening subledger state and link together.
- Unpost is blocked by later posted vendor invoices/payments or a closed period.
General ledger posting
| Condition | Debit | Credit | Result |
|---|---|---|---|
| Vendor opening Post | - | - | No duplicate GL; linked Accounting Opening Balance Journal supplies the entry. |
Other module and document effects
| Area | Effect | Conditional/no effect |
|---|---|---|
| Vendor subledger | Establishes payable and due/aging baseline. | No purchase expense, tax, inventory, or cash. |
| Finance | Becomes eligible for Payment Out settlement. | Posting alone does not pay vendor. |
| Accounting | Links to validated opening journal line. | Amount/nature mismatch blocks Post. |
Core acceptance scenarios
- Given opening details whose total and debit/credit nature match the linked journal line, when the accountant clicks Post, then the vendor payable baseline and due schedule become effective.
- Given later vendor invoices or payments exist, when the operation is attempted, then Unpost is rejected.
- 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
Required
Draft opening document, open date/period, vendor details, debit/credit nature, amount/currency, and linked opening journal line are required.
Optional or conditional
Due-date schedule, reference, and notes are optional/conditional.
Action behavior
Post verifies total and net nature equal the journal line, then makes payable baseline effective.
Blocking rule or downstream effect
Unpost requires open period and no later posted vendor invoice/payment activity.
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 |
|---|---|---|---|---|---|
| vendor-opening-balance | MainVendorDefintionsComponent | List/navigation | Permission: AppPurchasePermissions.VendorOpeningBalance_List; Guards: PolicyAuthGuard | Feature token match | apps/purchase/src/app/remote-entry/purchase-transactions/purchase-transactions.module.ts:44 |
Observed frontend fields and validation
| Component | Control | Observed frontend rule | Component source |
|---|---|---|---|
| - | - | No reactive formControlName controls were found for the routed components; review template-driven/shared child components. | Route sources above |
Observed frontend actions
| Component | Click action/handler | Business review requirement | Component source |
|---|---|---|---|
| - | - | No direct (click) handler was found; review shared toolbar/table commands and form submission bindings. | Route sources above |
Page-specific frontend acceptance criteria
- vendor-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: AppPurchasePermissions.VendorOpeningBalance_List; Guards: PolicyAuthGuard