---
id: TST-COM-FUL-076
title: Return receiving tables table
kind: integration
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/shipping/tests/integration/db/return-receiving-tables.table.integration.spec.js
implements:
  - ATS-COM-FUL-015-03
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  Run-created workspace identifiers and fixture records in the prepared test database; concurrency
  cases own their extra connections.
evidence:
  - repository: services-commerce
    path: modules/shipping/tests/integration/db/return-receiving-tables.table.integration.spec.js
    test_titles:
      - >-
        holds the receipt with its padded notes trimmed by the text-normalization trigger, and its
        line (premise)
      - >-
        refuses a second receipt under the same number and under the same idempotency key, by
        return_receipts_number_uq and return_receipts_idempotency_key_uq
      - >-
        refuses a state outside the three, by return_receipts_state_check, and a blank key, trimmed
        to nothing by the trigger and refused by NOT NULL (the not-blank check stands behind it)
      - >-
        refuses a receipt against another tenant’s return or RMA (the composite keys), by
        return_receipts_return_fk and return_receipts_authorization_fk
      - >-
        refuses deleting a warehouse a receipt arrived at (RESTRICT), by
        return_receipts_warehouse_fk
      - >-
        holds the received quantity to at least one and the dispositioned within it, by
        return_receipt_lines_quantities_check
      - >-
        refuses a condition outside the five and a second line under the same line number, by
        return_receipt_lines_condition_check and return_receipt_lines_number_uq
      - >-
        refuses a line of another tenant’s return line and of a shipment line that does not exist,
        by return_receipt_lines_return_line_fk and return_receipt_lines_shipment_line_fk
      - >-
        refuses a disposition outside the six and a quantity under one, by
        return_dispositions_disposition_check and return_dispositions_quantity_check
      - >-
        refuses a location the tenant does not have, by return_dispositions_location_fk, and
        cascades a line’s dispositions with the receipt
      - 'hides one tenant’s receipts, lines and dispositions from another, by the forced policies'
    scenario_anchors:
      - >-
        services-commerce:modules/shipping/tests/integration/db/return-receiving-tables.table.integration.spec.js#refuses
        a condition outside the five and a second line under the same line number, by
        return_receipt_lines_condition_check and return_receipt_lines_number_uq
---

# Return receiving tables table

## Verification Boundary

This suite checks return receiving tables table against the prepared PostgreSQL database. Its entry points are the persistence and service functions used by the tests.

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

Direct service and persistence calls do not establish the full HTTP permission contract, deployed scheduling or browser behavior. No execution result is claimed by this register.

## Real Dependencies and Test Doubles

The database and imported Commerce persistence services are real. Fixtures create the records owned by this run. Time-sensitive cases use a controlled clock where the source fixture supplies one.

## Must Not Be Doubled

Keep the database constraints, row visibility and persistence writes real when claiming this integration coverage. A canned repository response cannot replace the boundary being checked.
