---
id: TST-ACC-TRX-047
title: Customer terms precedence 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/invoices/customer-terms-precedence.integration.spec.js
implements:
  - ATS-ACC-TRX-001-05
implements_parts:
  - scenario: ATS-ACC-TRX-001-05
    assertion: >-
      it takes the bill-to’s default terms when the request names none, the due
      date 45 days after the invoice date
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/customer-terms-precedence.integration.spec.js#it
      takes the bill-to’s default terms when the request names none, the due
      date 45 days after the invoice date
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/invoices/customer-terms-precedence.integration.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/invoices/customer-terms-precedence.integration.spec.js
    assertion_titles:
      - >-
        an invoice’s payment terms from its bill-to’s customer terms
        (integration)
      - >-
        takes the terms the request names over the bill-to’s, the due date from
        them
      - >-
        takes the bill-to’s default terms when the request names none, the due
        date 45 days after the invoice date
      - answers the resolved terms on the invoice
      - keeps the request’s due date over the party’s terms’ days
      - >-
        leaves an invoice without terms when the bill-to has no record: none,
        due on the invoice date
      - leaves an invoice without terms when the bill-to’s record names none
      - resolves the terms again when a draft is replaced for another bill-to
    imports:
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { createPaymentTerms } =
        require('../../../../../books/services/persistence/payment-terms');
      - >-
        const { createDraft, updateDraft } =
        require('../../../../services/invoices/invoice-drafts');
      - >-
        const { putCustomerTerms } =
        require('../../../../services/persistence/customer-terms');
      - '} = require(''../../invoices-fixtures'');'
      - "\t\tworld.require();"
      - "\t\tworld.require();"
      - "\t\tworld.require();"
      - "\t\tworld.require();"
      - "\t\tworld.require();"
      - "\t\tworld.require();"
      - "\t\tworld.require();"
    test_double_declarations: []
---

# Customer terms precedence 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

Its cited assertions contribute evidence for due-date precedence is explicit. The structured assertion bindings identify which parts of combined scenarios it executes.

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