---
id: TST-COM-ORD-123
title: The proration model (11 §5)
kind: unit
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
repository: services-commerce
files:
  - modules/orders/tests/unit/amendments/proration.spec.js
implements:
  - ATS-COM-ORD-015-10
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: 'The suite owns its in-memory inputs, scripted responses and rendered component state.'
evidence:
  - provenance: test
    source: 'services-commerce:modules/orders/tests/unit/amendments/proration.spec.js'
    test_cases:
      - 'prorates by remaining days: 183 of 365, unused 6016, new 7521, net 1505'
      - >-
        prorates by remaining months with the 15th rule: July counts, 6 of 12, unused 6000, new 7500, net 1500
        (the brief’s figures)
      - 'leaves July out after its 15th: 5 of 12, unused 5000, new 6250, net 1250'
      - 'C2: alumni $150 to student $120 nets -1500, owed to the customer'
      - >-
        C4: a $90 promotional purchase under original_price credits 4500 and nets 3000; under standard_price
        6000 and 1500
      - >-
        full_difference credits no time and charges the whole difference; a negative difference is credited
        whole
      - new_full_term credits the unused value by the days and charges the new price in full
      - billing_periods counts the term’s months until a plan carries periods
      - no_charge and no_refund move no money
      - applies the minimum upgrade fee to a positive net only
      - 'counts a leap year as it falls: 2024 has 366 days, and e = start is a full-term swap'
      - >-
        refuses an effective date before the start or after the end, a lifetime term under a time method, and
        a method with no term
      - 'counts days and months without a clock, and shares half up'
scenario_coverage:
  - scenario: ATS-COM-ORD-015-10
    test_cases:
      - 'leaves July out after its 15th: 5 of 12, unused 5000, new 6250, net 1250'
      - >-
        full_difference credits no time and charges the whole difference; a negative difference is credited
        whole
      - new_full_term credits the unused value by the days and charges the new price in full
      - no_charge and no_refund move no money
      - applies the minimum upgrade fee to a positive net only
      - >-
        refuses an effective date before the start or after the end, a lifetime term under a time method, and
        a method with no term
      - 'prorates by remaining days: 183 of 365, unused 6016, new 7521, net 1505'
      - billing_periods counts the term’s months until a plan carries periods
      - >-
        C4: a $90 promotional purchase under original_price credits 4500 and nets 3000; under standard_price
        6000 and 1500
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
dependency_evidence:
  provenance: test
  source: 'services-commerce:modules/orders/tests/unit/amendments/proration.spec.js'
  declared_by_test: 'the arithmetic, the shared money rounding. Doubled: nothing (the inputs are literals).'
---

# The proration model (11 §5)

## Verification Boundary

The unit suite checks the named contract or helper with controlled inputs.

## What This Suite Proves

The registered cases check the proration model (11 §5) with their fixture records and assertions. Scenario bindings name only the examples those cases exercise.

## What It Does Not Prove

A registered file supplies no run result or verified conformance by itself. Local fixtures do not establish deployed cross-service behavior or complete browser journeys.

## Real Dependencies and Test Doubles

Inputs and external responses are controlled in process; this suite establishes no deployed service behavior.

## Must Not Be Doubled

The named contract validation or component behavior under assertion must use its actual implementation.
