---
id: TST-ACC-TRX-100
title: Remittances queries 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/persistence/remittances.queries.integration.spec.js
implements: []
implements_parts: []
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/persistence/remittances.queries.integration.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/persistence/remittances.queries.integration.spec.js
    assertion_titles:
      - remittances persistence reads (integration)
      - loadRemittance
      - maps the header whole
      - stamps the system instants with the execution’s clock
      - 'maps the lines whole, a line target with its invoice and line'
      - 'maps a voided header’s void, and the name the request gave the remitter'
      - answers another tenant’s remittance as absent
      - listRemittances
      - lists newest first by received date (premise of the filters)
      - filters by status
      - filters by reference
      - 'filters by remitter, and answers none for another'
      - 'filters by unit, and by the date range inclusive'
      - pages by the keyset of the last row
      - lists nothing of another tenant’s
      - listExpectedRemittancesOf
      - >-
        maps every column of a remitter’s open invoice, the balance in minor
        units, the name from the metadata
      - >-
        names the remitter from CRM when the metadata gives no name, and answers
        a missing option name as null
      - filters by unit and currency
      - pages by the keyset of the last row
      - lists nothing of another tenant’s
    imports:
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { TEST_NOW } =
        require('@rhythmsoftware/macroservice-testing/execution-context');
      - >-
        const { recordRemittance, voidRemittance } =
        require('../../../../services/remittances/remittance-commands');
      - >-
        const { listExpectedRemittancesOf, listRemittances, loadRemittance } =
        require('../../../../services/persistence/remittances');
      - '} = require(''../../remittances-fixtures'');'
      - 'const { putOrganization } = require(''../../parties-fixtures'');'
      - "\t\t\tconst { first } = world.require();"
      - "\t\t\tconst { first } = world.require();"
      - "\t\t\tconst { first, paid, members } = world.require();"
      - "\t\t\tconst { second } = world.require();"
      - "\t\t\tconst { first } = world.require();"
      - "\t\t\tconst { first, second } = world.require();"
      - "\t\t\tconst { first } = world.require();"
      - "\t\t\tconst { second } = world.require();"
      - "\t\t\tconst { first, second } = world.require();"
      - "\t\t\tconst { first } = world.require();"
      - "\t\t\tconst { first, second } = world.require();"
      - "\t\t\tconst { early, late, members } = world.require();"
      - "\t\t\tconst { lattice } = world.require();"
      - "\t\t\tconst { early, late } = world.require();"
    test_double_declarations: []
---

# Remittances queries 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

The executable assertions exercise this module, but no capability or feature scenario binding is established for this file. Its individual assertion titles remain in the evidence register for subsequent mapping.

## 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.
