---
id: TST-COM-FUL-050
title: Adjustment planning
kind: unit
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js
implements:
  - ATS-COM-FUL-007-02
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: 'In-memory inputs, recorded calls and test-owned doubles; no shared customer records.'
evidence:
  - repository: services-commerce
    path: modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js
    test_titles:
      - >-
        plans the memo, the fee, the credit from the freed money, its application to the fee and the
        refund of the remainder, in that order, each under its key
      - >-
        plans a credit of the remainder under the credit action, and nothing beyond the fee under
        none
      - 'takes all the freed money for a fee larger than what was paid, with no remainder'
      - >-
        plans the memo alone for a line never paid, the fee invoice beside it when the terms charge
        one, and nothing without an invoice
      - treats a zero fee as no fee
      - >-
        applies the freed money to an amendment’s new invoice before the remainder (11 §7.1, P7): a
        credit and its application by invoice id, then the credit of what is left
      - >-
        invoices a second fee on its own product after the first, paid from the freed money the
        first left, then refunds the rest (D-P7-32)
      - 'spells every key commerce:{document_kind}:{document_id}:{step}'
    scenario_anchors:
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#plans
        the memo, the fee, the credit from the freed money, its application to the fee and the
        refund of the remainder, in that order, each under its key
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#plans
        the memo alone for a line never paid, the fee invoice beside it when the terms charge one,
        and nothing without an invoice
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#treats
        a zero fee as no fee
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#applies
        the freed money to an amendment’s new invoice before the remainder (11 §7.1, P7): a credit
        and its application by invoice id, then the credit of what is left
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#spells
        every key commerce:{document_kind}:{document_id}:{step}
---

# Adjustment planning

## Verification Boundary

This suite checks adjustment planning with controlled inputs and recorded dependencies. Its entry points remain within the process.

## What This Suite Proves

The bound scenarios identify the assertions this suite contributes. Source anchors retain the exact test cases; where a capability scenario has several contributing suites, a single binding does not imply that every branch runs here.

## What It Does Not Prove

Controlled inputs do not establish database enforcement, deployed integration or browser behavior. A recorded call is evidence about the adapter contract rather than a remote operation.

## Real Dependencies and Test Doubles

The imported logic is real; test inputs and dependency responses are controlled.

## Must Not Be Doubled

Keep the imported production logic and its request construction real. Record dependency calls and refusals rather than replacing the behavior being asserted.
