---
id: TST-ACC-TRX-146
title: Invoice payability 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/invoice-payability.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: 1
isolation: In-memory fixtures and test-controlled collaborators.
provenance: test
source: >-
  services-accounting:modules/transactions/tests/unit/rules/invoice-payability.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/unit/rules/invoice-payability.spec.js
    assertion_titles:
      - the payable description rules
      - payableDescriptionOf
      - >-
        answers the invoice itself, cards and e-checks allowed, no Commerce
        settings, and no fee for a policy of none
      - >-
        quotes a required fee on the balance due by the unit’s rule (1.0’s fee
        of 60 on 300 at 20%), the rule beside it
      - >-
        quotes an optional fee the same way, marking it optional, so the payer
        can be asked
      - >-
        quotes the fee on the amount tendered when it is less than the balance,
        raised to the minimum (1.0’s 60 to 100), and on the balance when it is
        more
      - >-
        quotes no fee for a check, an electronic check the rule does not charge,
        a unit with no rule, or a fee invoice itself
      - tenderSpreadOf
      - >-
        lands a stated amount over the invoices in order, each at most its
        balance, in the first invoice’s currency alone
      - >-
        lands every invoice’s whole balance without a stated amount, and spreads
        in the stated currency when named
      - payableInvoicesDescriptionOf
      - >-
        answers the descriptions, both tenders allowed when every invoice allows
        them
      - refuses a tender when one invoice refuses it
      - >-
        sums the balances due and the totals per currency, in the order the
        currencies appear, in minor units, no fee without a rule
      - >-
        quotes the totals’ fee once over the fee-bearing invoices’ card amounts
        (the minimum charged once), per currency
      - >-
        answers no totals and both tenders allowed for a customer with nothing
        open
    imports:
      - 'const { expect } = require(''chai'');'
      - '} = require(''../../../services/invoices/invoice-payability'');'
    test_double_declarations: []
---

# Invoice payability 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

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

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.
