Appearance
Payment Out
| Backlog field | Value |
|---|---|
| Story ID | AP-FIN-006 |
| Epic | Finance |
| Story type | Business workflow |
| 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 cashiers, I want to record, allocate, post, print, and reverse outgoing payments so that vendor and account balances reflect paid funds.
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
- Validate Draft state, open period, payment hub/method, amount, details, currency/rate, party accounts, and the resulting Bank/Treasury balance.
- Debit Customer Receivable, Vendor Payable, or explicit Other GL per detail. Credit the selected Treasury Account or Bank Account GL.
- Add configured commission/VAT debits and their Bank/Treasury counterpart, then delegate the journal to Accounting.
- Create and link the Bank/Treasury transaction and mark Payment Out Posted.
- Journal, hub movement, balances, and status commit together. Unpost requires an open period and reversible journal, then removes the hub movement and posts the accounting reversal.
General ledger posting
| Component | Debit | Credit | Account rule |
|---|---|---|---|
| Disbursement | Customer Receivable, Vendor Payable, or Other GL | Bank/Treasury GL | Party account customer/vendor then category; other is explicit. |
| Commission/fee | Commission/fee expense | Bank/Treasury GL | Only when configured. |
| Fee VAT | Configured tax account | Bank/Treasury GL | Only for taxable configured fee. |
Other module and document effects
| Area | Effect | Conditional/no effect |
|---|---|---|
| Bank/Treasury | Decreases hub balance and creates linked transaction. | Insufficient balance blocks all effects. |
| Vendor/customer | Settles or adjusts eligible party balances. | Other-GL payment has no party subledger effect. |
| Inventory | No stock quantity/valuation effect. | Purchase Return stock is handled by its own Stock Out. |
Core acceptance scenarios
- Given a valid Draft payment with sufficient bank/treasury balance, when the cashier clicks Post, then party/other accounts are debited, the hub is credited, its subledger movement is created, and status becomes Posted.
- Given the resulting hub balance is negative or an account is missing, when the operation is attempted, then Post is rejected without a journal or subledger movement.
- 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.
Required and conditional data
Draft payment, date/open period, hub, amount, currency/rate, at least one detail, and payment method are required. Treasury or bank account is conditional on hub. Cheque/reference, customer/vendor, commission, VAT, and other GL are conditional.
Account resolution and Post effects
- Credit Treasury account or Bank Account GL for total cash outflow.
- Debit customer Receivable (customer then category), vendor Payable (vendor then category), or explicit Other GL per detail.
- Post commission and VAT through payment-method configured accounts with bank/treasury counterpart.
- Create bank/treasury transaction records and link the journal.
Before Post, the resulting bank/treasury balance is validated; a negative balance is rejected. Post accepts Draft only and commits journal, subledger movement, balances, and Posted status atomically.
Unpost requires an open period and reversible journal, reverses the journal, soft-deletes bank/treasury movements, restores linked balances where applicable, and prevents partial reversal.
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) | PaymentOutListComponent | List/navigation | Permission: AppFinancePermissions.PaymentOut_List; Guards: PolicyAuthGuard | Explicit frontend feature rule | apps/finance/src/app/remote-entry/transactions/transactions.module.ts:110 |
| add | AddPaymentOutComponent | Add | Permission: AppFinancePermissions.PaymentOut_Add; Guards: PolicyAuthGuard | Explicit frontend feature rule | apps/finance/src/app/remote-entry/transactions/transactions.module.ts:121 |
| edit/:id | EditPaymentOutComponent | Edit | Permission: AppFinancePermissions.PaymentOut_Edit; Guards: PolicyAuthGuard, preventPostedGuard | Explicit frontend feature rule | apps/finance/src/app/remote-entry/transactions/transactions.module.ts:132 |
| paymentout | MainPaymentOutComponent | List/navigation | Permission: AppFinancePermissions.PaymentOut_List; Guards: PolicyAuthGuard | Explicit frontend feature rule | apps/finance/src/app/remote-entry/transactions/transactions.module.ts:99 |
| view/:id | ViewPaymentOutComponent | View/detail | Permission: AppFinancePermissions.PaymentOut_View; Guards: PolicyAuthGuard | Explicit frontend feature rule | apps/finance/src/app/remote-entry/transactions/transactions.module.ts:144 |
Observed frontend fields and validation
| Component | Control | Observed frontend rule | Component source |
|---|---|---|---|
| AddPaymentOutComponent | amount | Required in component validator | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | bankAccountId | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | description | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | glAccountId | Conditionally required/validated in component | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | notes | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | paidBy | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | paidByDetailsId | Required in component validator | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | paymentHub | Required in component validator | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | paymentHubDetailId | Required in component validator | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | paymentMethodId | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | paymentOutDate | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | rate | Required in component validator | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| EditPaymentOutComponent | amount | Required in component validator | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | bankAccountId | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | description | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | glAccountId | Conditionally required/validated in component | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | notes | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | paidBy | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | paidByDetailsId | Required in component validator | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | paymentHubDetailId | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | paymentMethodId | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | paymentOutDate | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | rate | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| PaymentOutListComponent | BankAccountId | Visible control; optional or API-dependent | apps/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
Observed frontend actions
| Component | Click action/handler | Business review requirement | Component source |
|---|---|---|---|
| AddPaymentOutComponent | addNewRow | Add 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/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | createVat | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | deleteLine | 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/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | handleButtonClick | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | openCostPopup | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| AddPaymentOutComponent | openDialogSearch | Open 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/finance/src/app/remote-entry/transactions/pages/paymentout/add-payment-out/add-payment-out.component.ts |
| EditPaymentOutComponent | addNewRow | Add 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/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | createVat | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | handleButtonClick | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | onDelete | 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/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | openCostPopup | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| EditPaymentOutComponent | openDialogSearch | Open 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/finance/src/app/remote-entry/transactions/pages/paymentout/edit-payment-out/edit-payment-out.component.ts |
| PaymentOutListComponent | navigateHelpPageComponent | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
| PaymentOutListComponent | onDelete | 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/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
| PaymentOutListComponent | onEdit | 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/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
| PaymentOutListComponent | onPost | Available 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/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
| PaymentOutListComponent | onUnPost | Available 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/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
| PaymentOutListComponent | onView | 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/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
| PaymentOutListComponent | printout | 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/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
| PaymentOutListComponent | routeToJournalView | 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/finance/src/app/remote-entry/transactions/pages/paymentout/payment-out-list/payment-out-list.component.ts |
| ViewPaymentOutComponent | handleButtonClick | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/view-payment-out/view-payment-out.component.ts |
| ViewPaymentOutComponent | openCostPopup | Document the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler. | apps/finance/src/app/remote-entry/transactions/pages/paymentout/view-payment-out/view-payment-out.component.ts |
| ViewPaymentOutComponent | routeToJournalView | 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/finance/src/app/remote-entry/transactions/pages/paymentout/view-payment-out/view-payment-out.component.ts |
Page-specific frontend acceptance criteria
- (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: AppFinancePermissions.PaymentOut_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: AppFinancePermissions.PaymentOut_Add; Guards: PolicyAuthGuard
- 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: AppFinancePermissions.PaymentOut_Edit; Guards: PolicyAuthGuard, preventPostedGuard
- paymentout - 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: AppFinancePermissions.PaymentOut_List; Guards: PolicyAuthGuard
- 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: AppFinancePermissions.PaymentOut_View; Guards: PolicyAuthGuard