---
id: TST-ACC-TRX-143
title: Customer summary suite
kind: unit
product_area: accounting
module: transactions
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/transactions/tests/unit/rules/customer-summary.spec.js
implements:
  - ATS-ACC-TRX-017-02
implements_parts:
  - scenario: ATS-ACC-TRX-017-02
    assertion: >-
      it counts an invoice due today as not yet overdue, and one due yesterday
      as overdue
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/unit/rules/customer-summary.spec.js#it
      counts an invoice due today as not yet overdue, and one due yesterday as
      overdue
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: In-memory fixtures and test-controlled collaborators.
provenance: test
source: >-
  services-accounting:modules/transactions/tests/unit/rules/customer-summary.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/unit/rules/customer-summary.spec.js
    assertion_titles:
      - the customer summary’s figures
      - >-
        sums the open invoices, counts the overdue ones among them, the
        unapplied payments and the available credit, and nets them
      - >-
        answers one row per currency in code order, each netted on its own,
        where 1.0 threw on a second currency
      - >-
        answers no currencies and no activity date for a customer with nothing
        open (1.0’s zero balance)
      - >-
        counts an invoice due today as not yet overdue, and one due yesterday as
        overdue
      - >-
        counts the unapplied payments another party sent (a payer that is not
        the customer, or a payer known by name alone) again, and not the
        customer’s own
    imports:
      - 'const { expect } = require(''chai'');'
      - >-
        const { customerSummaryOf } =
        require('../../../services/customers/customer-summary');
    test_double_declarations: []
---

# Customer summary suite

## Verification Boundary

The suite exercises financial calculations and input contracts in an isolated test process. 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 due today remains current. The structured assertion bindings identify which parts of combined scenarios it executes.

## What It Does Not Prove

Pure calculations and doubled collaborators do not establish database persistence, route authorization or deployed behavior. An unbound feature chain remains proposed, and this registration carries no execution result.

## Real Dependencies and Test Doubles

The imported calculation or contract runs with the fixtures and collaborators declared by the test. The evidence register retains those declarations so the boundaries can be inspected.

## Must Not Be Doubled

The calculation or contract being asserted must remain real; replacing it with a predetermined result removes this suite’s evidence.
