---
id: JNY-ACC-TRX-002
title: Settle with credit and correct receipt placement
feature: FEAT-ACC-TRX-03
product_area: accounting
module: transactions
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
  - ACT-ACC-0300
  - ACT-ACC-0301
  - ACT-ACC-0304
  - ACT-ACC-0306
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
actor: ACT-ACC-012
goal: 'Combine goodwill credit and check money across member invoices, then relocate a later misapplied receipt.'
capabilities:
  - CAP-ACC-TRX-011
  - CAP-ACC-TRX-009
  - CAP-ACC-TRX-006
  - CAP-ACC-TRX-008
  - CAP-ACC-TRX-013
screens:
  - '/console/{tenantId}/accounting/credits/new'
  - '/console/{tenantId}/accounting/payments/receive'
  - '/console/{tenantId}/accounting/settlements/{settlementId}'
  - '/console/{tenantId}/accounting/payments/{paymentId}'
steps:
  - 'n': 1
    surface: '/console/{tenantId}/accounting/credits/new'
    action: Issue 25.00 of goodwill credit with an explanation and accounting destinations.
    capability: CAP-ACC-TRX-011
    expected: A numbered open credit retains the full available amount.
    provenance: test
    source: 'react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0301.spec.ts#ACT-ACC-0301'
  - 'n': 2
    surface: '/console/{tenantId}/accounting/payments/receive'
    action: Choose both invoices and review a 175.00 check with its reference and batch.
    capability: CAP-ACC-TRX-009
    expected: The review combines 25.00 credit with 175.00 money and completion settles both bills.
    provenance: test
    source: 'react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0301.spec.ts#ACT-ACC-0301'
  - 'n': 3
    surface: '/console/{tenantId}/accounting/settlements/{settlementId}'
    action: Follow the settlement to its credit and application records.
    capability: CAP-ACC-TRX-009
    expected: Component references remain inspectable and the consumed credit is used.
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/settlements/settlement-linkage.integration.spec.js#it
      names its settlement on the payment and on the intent it made
  - 'n': 4
    surface: '/console/{tenantId}/accounting/payments/receive'
    action: Record a later check without allocation instructions.
    capability: CAP-ACC-TRX-006
    expected: The receipt succeeds with its entire value available.
    provenance: test
    source: 'react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0300.spec.ts#ACT-ACC-0300'
  - 'n': 5
    surface: '/console/{tenantId}/accounting/payments/{paymentId}'
    action: 'Apply that check, identify the wrong target and relocate its allocation.'
    capability: CAP-ACC-TRX-008
    expected: Opposing history restores the wrong bill while the replacement settles the intended one.
    provenance: test
    source: 'react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0304.spec.ts#ACT-ACC-0304'
alternates:
  - from_step: 2
    condition: Staff leave individual credit selection unspecified.
    path: Eligible credit is selected oldest first.
    outcome: Tender covers the debt remaining after credit use.
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/settlements/settlements.integration.spec.js#it
      applies the open credit’s 500 first and takes a check of 8000 for the rest: completed with its payment
failures:
  - from_step: 5
    condition: The bank returns the allocated check.
    path: Staff enter its bounced-check outcome with an explanation.
    outcome: The receipt becomes returned and its formerly settled debt reopens.
    provenance: test
    source: 'react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0306.spec.ts#ACT-ACC-0306'
  - from_step: 2
    condition: The selected population includes an unrelated member’s bill.
    path: Customer eligibility rejects settlement before holding value.
    outcome: Staff remove the invalid target without earlier financial changes.
    provenance: documented
    source: 'services-accounting:docs/accounting/settlements.md#Refusals'
rules_in_play:
  - BR-CAP-ACC-TRX-011-01
  - BR-CAP-ACC-TRX-009-03
  - BR-CAP-ACC-TRX-009-04
  - BR-CAP-ACC-TRX-008-02
  - BR-CAP-ACC-TRX-008-06
  - BR-CAP-ACC-TRX-013-03
assertions:
  - id: AS-JNY-ACC-TRX-002-01
    statement: Credit use precedes check allocation and leaves both selected bills settled.
    provenance: test
    source: 'react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0301.spec.ts#ACT-ACC-0301'
  - id: AS-JNY-ACC-TRX-002-02
    statement: Settlement components retain references for following their related records.
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/settlements/settlement-linkage.integration.spec.js#it
      answers its settlement in the get
  - id: AS-JNY-ACC-TRX-002-03
    statement: The earlier application survives reallocation as fully reversed history.
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js#it
      writes a reversing row for the 5000 and a new row for the 4000, the original marked reversed in full
  - id: AS-JNY-ACC-TRX-002-04
    statement: The resulting receivable facts reconcile to the current financial balances.
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js#it
      writes the reversal’s facts, mirrored, so the items still agree with the balances
e2e_policy: required
e2e_reason: >-
  The settlement review and reallocation controls require browser coverage alongside the financial service
  assertions.
proved_by: []
---

# Settle with credit and correct receipt placement

## Story

Finance gives a member goodwill value and combines it with the member’s check to settle dues and event billing. Staff review the credit contribution before confirming the remaining tender. A later uninstructed receipt starts available, then needs correction after it pays the wrong bill. Reallocation retains the mistaken application, its opposite and the replacement. If the bank returns the check instead, staff record that outcome and restore the debt.
