---
id: TST-ACC-TRX-119
title: Receivables aging credit application suite
kind: integration
product_area: accounting
module: transactions
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - >-
    modules/transactions/tests/integration/services/runs/ar-aging-credit-application.integration.spec.js
implements:
  - ATS-ACC-TRX-018-02
implements_parts:
  - scenario: ATS-ACC-TRX-018-02
    assertion: >-
      it holds a check with nothing allocated as the customer’s unapplied money,
      from its date on
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/runs/ar-aging-credit-application.integration.spec.js#it
      holds a check with nothing allocated as the customer’s unapplied money,
      from its date on
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  Suite-marked records in the prepared local test database; fixture teardown
  removes owned records.
provenance: test
source: >-
  services-accounting:modules/transactions/tests/integration/services/runs/ar-aging-credit-application.integration.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/runs/ar-aging-credit-application.integration.spec.js
    assertion_titles:
      - the A/R aging snapshot of credit applications and unapplied payments
      - 'wrote the reversed application, its reversal and the kept one (premise)'
      - leaves the invoice and the credit whole the day before the application
      - >-
        reduces the invoice’s open item and the credit’s unapplied item by the
        application on its date
      - keeps both reduced until the day before the reversal
      - restores both on the reversal’s date
      - 'reduces both by an application that is not reversed, from its date on'
      - >-
        holds a check with nothing allocated as the customer’s unapplied money,
        from its date on
      - 'publishes September, every check passed'
      - >-
        captures each invoice, each credit and the unapplied payment at its
        balance of 30 September, and no item of a credit application
      - copies the payment’s and each credit’s number as the document number
      - >-
        gives a credit application no item kind: it is the source of the items’
        facts, never an open item
    imports:
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { applyCredit, reverseCreditApplication } =
        require('../../../../services/credits/credit-commands');
      - >-
        const { ITEM_KIND_OF_OPEN_ITEM_TYPE } =
        require('../../../../db/ar-snapshot-items.table');
      - '} = require(''../../ar-aging-fixtures'');'
      - "\t\tconst { reversed, reversal, kept } = running.require();"
      - "\t\tconst { i1, c1 } = running.require();"
      - "\t\tconst { i1, c1 } = running.require();"
      - "\t\tconst { i1, c1 } = running.require();"
      - "\t\tconst { i1, c1 } = running.require();"
      - "\t\tconst { i2, c2 } = running.require();"
      - "\t\tconst { unapplied } = running.require();"
      - "\t\tconst { run } = running.require();"
      - "\t\tconst { run, i1, i2, i3, c1, c2, c3, unapplied } = running.require();"
      - "\t\tconst { run } = running.require();"
    test_double_declarations: []
---

# Receivables aging credit application suite

## Verification Boundary

The suite exercises transaction commands and database protections in the local prepared test environment. Registration records the existing executable file; it does not report a run or establish product approval.

## What This Suite Proves

Its cited assertions contribute evidence for capture excludes information learned after cutoff. The structured assertion bindings identify which parts of combined scenarios it executes.

## What It Does Not Prove

Local commands and route invocations do not establish deployed routing, live processor guarantees or the complete staff browser experience. An unbound feature chain remains proposed, and this registration carries no execution result.

## Real Dependencies and Test Doubles

The suite uses the imported commands, route handlers or persistence code against the local test database. Fixture helpers supply accounting context; any stepped clock, dummy processor or substituted external client is retained in the evidence declarations.

## Must Not Be Doubled

The command or persistence behavior under assertion and its relevant database protections must remain real. Substituting the final financial result removes evidence of transactional effects.
