---
id: ATS-COM-ORD-017
scope: CAP-COM-ORD-017
product_area: commerce
module: orders
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-COM-ORD-017-01
    title: Vendor replacement preserves validated details
    level: api
    proves:
      - BR-CAP-COM-ORD-017-01
    preconditions: A vendor uses mixed-case e-mail and a supplier address.
    steps:
      - do: 'Create and replace it, retry a stale version and submit an unassigned country code.'
        provenance: test
        source: >-
          services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#creates the vendor with its
          e-mail address lowercased, reads and lists it, replaces it at the version read (a stale one 409)
    expected: >-
      E-mail normalizes, stale replacement is refused and address.country identifies the invalid-country
      error.
    negative: false
    data_needs: Use the controlled records and transports established by the cited tests.
    bound_to:
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#creates the vendor with its
        e-mail address lowercased, reads and lists it, replaces it at the version read (a stale one 409)
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#refuses a supplier address whose
        country is not an ISO 3166-1 code (ZZ), on a create and on a replacement, 400 naming address.country
      - TST-COM-ORD-155
    provenance: test
    source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#creates the vendor with its e-mail
      address lowercased, reads and lists it, replaces it at the version read (a stale one 409)
    category: validation
    expected_provenance: test
    expected_source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#creates the vendor with its e-mail
      address lowercased, reads and lists it, replaces it at the version read (a stale one 409)
  - id: ATS-COM-ORD-017-02
    title: Referenced suppliers cannot be deleted
    level: api
    proves:
      - BR-CAP-COM-ORD-017-02
    preconditions: A vendor has purchasing references.
    steps:
      - do: Attempt deletion.
        provenance: test
        source: >-
          services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#refuses a receipt against the
          received order 409, a receipt line with no quantity 400, and the vendor’s delete 409
    expected: The response returns 409 with the reference explanation.
    negative: true
    data_needs: Use the controlled records and transports established by the cited tests.
    bound_to:
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#refuses a receipt against the
        received order 409, a receipt line with no quantity 400, and the vendor’s delete 409
      - TST-COM-ORD-155
    provenance: test
    source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#refuses a receipt against the
      received order 409, a receipt line with no quantity 400, and the vendor’s delete 409
    category: invariant
    expected_provenance: test
    expected_source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#refuses a receipt against the
      received order 409, a receipt line with no quantity 400, and the vendor’s delete 409
  - id: ATS-COM-ORD-017-03
    title: Draft round-trip remains strict before issue
    level: api
    proves:
      - BR-CAP-COM-ORD-017-03
    preconditions: A draft purchase order contains numbered lines.
    steps:
      - do: 'Replace the record as read, try an undeclared line field and issue the valid draft.'
        provenance: test
        source: >-
          services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#replaces the draft at the
          version read with the record exactly as it was read, read-only line columns included, and answers
          the same lines one version on
    expected: 'Round-trip replacement advances the version, the unknown field fails and issue advances the lifecycle.'
    negative: false
    data_needs: Use the controlled records and transports established by the cited tests.
    bound_to:
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#replaces the draft at the
        version read with the record exactly as it was read, read-only line columns included, and answers the
        same lines one version on
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#still refuses a line that states
        a column no purchase order line has (the schema stays strict)
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#drafts the order numbered with
        its line and issues it
      - TST-COM-ORD-155
    provenance: test
    source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#replaces the draft at the version
      read with the record exactly as it was read, read-only line columns included, and answers the same lines
      one version on
    category: transition
    expected_provenance: test
    expected_source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#replaces the draft at the version
      read with the record exactly as it was read, read-only line columns included, and answers the same lines
      one version on
  - id: ATS-COM-ORD-017-04
    title: Received commitments use closing to cancel the remainder
    level: api
    proves:
      - BR-CAP-COM-ORD-017-04
    preconditions: An order has received ninety of one hundred units alongside unreceived drafts.
    steps:
      - do: 'Try cancellation, close the received case and cancel draft or line quantities.'
        provenance: test
        source: >-
          services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#tells a
          partially received order to close instead, not its status
    expected: >-
      The received case requests closing, which cancels ten remaining units, while eligible unreceived
      cancellations proceed.
    negative: false
    data_needs: Use the controlled records and transports established by the cited tests.
    bound_to:
      - >-
        services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#tells a partially
        received order to close instead, not its status
      - >-
        services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#cancels a draft
        and an issued order nothing was received against
      - >-
        services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#closes
        an issued order after 90 of 100: cancelled_quantity 10, status closed; cancelling it instead is
        refused
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#closes a second order with
        unreceived quantity: the remainder cancelled, and cancels part of a line on another
      - TST-COM-ORD-162
      - TST-COM-ORD-160
      - TST-COM-ORD-155
    provenance: test
    source: >-
      services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#tells a partially
      received order to close instead, not its status
    category: transition
    expected_provenance: test
    expected_source: >-
      services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#tells a partially
      received order to close instead, not its status
  - id: ATS-COM-ORD-017-05
    title: Open quantity derives from the line counters
    level: unit
    proves:
      - BR-CAP-COM-ORD-017-05
    preconditions: One hundred ordered units include sixty received and ten cancelled.
    steps:
      - do: Calculate the remaining quantity.
        provenance: test
        source: >-
          services-commerce:modules/purchasing/tests/unit/cost/cost-rules.spec.js#is the ordered quantity less
          what was received and cancelled
    expected: The result is thirty units.
    negative: false
    data_needs: Use the controlled records and transports established by the cited tests.
    bound_to:
      - >-
        services-commerce:modules/purchasing/tests/unit/cost/cost-rules.spec.js#is the ordered quantity less
        what was received and cancelled
      - TST-COM-ORD-161
    provenance: test
    source: >-
      services-commerce:modules/purchasing/tests/unit/cost/cost-rules.spec.js#is the ordered quantity less
      what was received and cancelled
    category: rule
    expected_provenance: test
    expected_source: >-
      services-commerce:modules/purchasing/tests/unit/cost/cost-rules.spec.js#is the ordered quantity less
      what was received and cancelled
  - id: ATS-COM-ORD-017-06
    title: Purchasing API preserves read-only and workspace boundaries
    level: api
    proves:
      - BR-CAP-COM-ORD-017-06
    preconditions: 'Contexts include reader, application-denied, absent and other-workspace callers.'
    steps:
      - do: Read and mutate vendor and valuation records.
        provenance: test
        source: >-
          services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#lets a reader list and read,
          refuses the reader every write 403 permission_missing, a denied principal 403 app_not_permitted, no
          context 401, and another tenant 404
    expected: >-
      Authorized reads succeed, mutations and denied application access fail, missing context returns 401 and
      other records are not found.
    negative: true
    data_needs: Use the controlled records and transports established by the cited tests.
    bound_to:
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#lets a reader list and read,
        refuses the reader every write 403 permission_missing, a denied principal 403 app_not_permitted, no
        context 401, and another tenant 404
      - TST-COM-ORD-155
    provenance: test
    source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#lets a reader list and read,
      refuses the reader every write 403 permission_missing, a denied principal 403 app_not_permitted, no
      context 401, and another tenant 404
    category: permission
    expected_provenance: test
    expected_source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#lets a reader list and read,
      refuses the reader every write 403 permission_missing, a denied principal 403 app_not_permitted, no
      context 401, and another tenant 404
  - id: ATS-COM-ORD-017-07
    title: Received stock changes how the remaining commitment can end
    category: interaction
    level: api
    proves:
      - BR-CAP-COM-ORD-017-04
      - BR-CAP-COM-ORD-018-02
    preconditions: An issued purchase order covers one hundred units.
    steps:
      - do: 'Receive ninety, attempt order cancellation and close the remainder.'
        provenance: proposed
        source:
          - >-
            services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#tells a
            partially received order to close instead, not its status
          - >-
            services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#refuses
            a receipt beyond what the line has open (over_receipt) and a receipt against a received order,
            writing nothing
    expected: The cancellation is refused and closing cancels the remaining ten units without removing the receipt.
    negative: false
    data_needs: Use an isolated workspace with the records and responses named in the preconditions.
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#tells a partially
        received order to close instead, not its status
      - >-
        services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#refuses
        a receipt beyond what the line has open (over_receipt) and a receipt against a received order, writing
        nothing
    exercises:
      - CAP-COM-ORD-017
      - CAP-COM-ORD-018
    related_capabilities:
      - CAP-COM-ORD-018
    expected_provenance: proposed
    expected_source:
      - >-
        services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#tells a partially
        received order to close instead, not its status
      - >-
        services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#refuses
        a receipt beyond what the line has open (over_receipt) and a receipt against a received order, writing
        nothing
evidence:
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#closes a second
    order with unreceived quantity: the remainder cancelled, and cancels part of a line on another
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#creates the
    vendor with its e-mail address lowercased, reads and lists it, replaces it at the version read (a stale
    one 409)
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#drafts the order
    numbered with its line and issues it
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#lets a reader
    list and read, refuses the reader every write 403 permission_missing, a denied principal 403
    app_not_permitted, no context 401, and another tenant 404
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#refuses a
    receipt against the received order 409, a receipt line with no quantity 400, and the vendor’s delete 409
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#refuses a
    supplier address whose country is not an ISO 3166-1 code (ZZ), on a create and on a replacement, 400
    naming address.country
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#replaces the
    draft at the version read with the record exactly as it was read, read-only line columns included, and
    answers the same lines one version on
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#still refuses a
    line that states a column no purchase order line has (the schema stays strict)
  - >-
    Examined reference:
    services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#closes
    an issued order after 90 of 100: cancelled_quantity 10, status closed; cancelling it instead is refused
  - >-
    Examined reference: services-commerce:modules/purchasing/tests/unit/cost/cost-rules.spec.js#is the ordered
    quantity less what was received and cancelled
  - >-
    Examined reference:
    services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#cancels a draft and
    an issued order nothing was received against
  - >-
    Examined reference:
    services-commerce:modules/purchasing/tests/unit/orders/purchase-order-cancel.spec.js#tells a partially
    received order to close instead, not its status
coverage:
  rule: covered
  transition: 'gap: FND-COM-ORD-074'
  validation: covered
  permission: 'gap: FND-COM-ORD-074'
  edge: 'gap: FND-COM-ORD-074'
  failure: 'gap: FND-COM-ORD-074'
  boundary: 'gap: FND-COM-ORD-074'
  concurrency: 'gap: FND-COM-ORD-074'
  invariant: 'gap: FND-COM-ORD-074'
  interaction: covered
coverage_definition: Covered means a design scenario exists; executable coverage and execution results are separate.
permission_coverage:
  - key: commerce.purchasing.read
    where_checked: api
    scenarios:
      - ATS-COM-ORD-017-06
    gap: FND-COM-ORD-074
    note: >-
      The listed examples do not establish a complete allow-and-deny matrix for this key; unused catalogue
      keys need no invented route.
    provenance: unknown
    source: FND-COM-ORD-074
  - key: commerce.purchasing.create
    where_checked: api
    scenarios:
      - ATS-COM-ORD-017-06
    gap: FND-COM-ORD-074
    note: >-
      The listed examples do not establish a complete allow-and-deny matrix for this key; unused catalogue
      keys need no invented route.
    provenance: unknown
    source: FND-COM-ORD-074
  - key: commerce.purchasing.update
    where_checked: api
    scenarios:
      - ATS-COM-ORD-017-06
    gap: FND-COM-ORD-074
    note: >-
      The listed examples do not establish a complete allow-and-deny matrix for this key; unused catalogue
      keys need no invented route.
    provenance: unknown
    source: FND-COM-ORD-074
  - key: commerce.purchasing.delete
    where_checked: api
    scenarios:
      - ATS-COM-ORD-017-06
    gap: FND-COM-ORD-074
    note: >-
      The listed examples do not establish a complete allow-and-deny matrix for this key; unused catalogue
      keys need no invented route.
    provenance: unknown
    source: FND-COM-ORD-074
  - key: commerce.purchasing.bulk
    where_checked: api
    scenarios:
      - ATS-COM-ORD-017-06
    gap: FND-COM-ORD-074
    note: >-
      The listed examples do not establish a complete allow-and-deny matrix for this key; unused catalogue
      keys need no invented route.
    provenance: unknown
    source: FND-COM-ORD-074
transition_coverage:
  - state_model: STATE-COM-ORD-013
    from: draft
    to: issued
    trigger: Staff move the stock order into issue.
    scenarios:
      - ATS-COM-ORD-017-03
    provenance: test
    source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#drafts the order numbered with its
      line and issues it
    note: The cited test exercises this transition; other transitions retain separate gaps.
  - state_model: STATE-COM-ORD-013
    from: issued
    to: partially_received
    trigger: Goods arrival covers part of the outstanding remainder.
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#records
      the first receipt numbered, against the order, with one line of 60 at the order line’s cost, and the
      order partially received
    note: 'Individual examples do not exhaustively prove this transition, its guard and side effects.'
  - state_model: STATE-COM-ORD-013
    from: partially_received
    to: received
    trigger: Receipt or quantity cancellation removes the final remainder.
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#receives
      the remaining 40 and the order is received with its instant; the two layers stand oldest first
    note: 'Individual examples do not exhaustively prove this transition, its guard and side effects.'
  - state_model: STATE-COM-ORD-013
    from: issued
    to: received
    trigger: Full receipt or line cancellation removes all outstanding units.
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/services/persistence/purchase-orders.ts:cancelPurchaseOrderLineQuantity
    note: 'Individual examples do not exhaustively prove this transition, its guard and side effects.'
  - state_model: STATE-COM-ORD-013
    from: partially_received
    to: closed
    trigger: Staff conclude a partly received order.
    scenarios:
      - ATS-COM-ORD-017-04
    provenance: test
    source: >-
      services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#closes
      an issued order after 90 of 100: cancelled_quantity 10, status closed; cancelling it instead is refused
    note: The cited test exercises this transition; other transitions retain separate gaps.
  - state_model: STATE-COM-ORD-013
    from: issued
    to: closed
    trigger: Staff conclude an issued order.
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: 'services-commerce:modules/purchasing/services/persistence/purchase-orders.ts:closePurchaseOrder'
    note: 'Individual examples do not exhaustively prove this transition, its guard and side effects.'
  - state_model: STATE-COM-ORD-013
    from: received
    to: closed
    trigger: Staff conclude a fully received order.
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: 'services-commerce:modules/purchasing/services/persistence/purchase-orders.ts:closePurchaseOrder'
    note: 'Individual examples do not exhaustively prove this transition, its guard and side effects.'
  - state_model: STATE-COM-ORD-013
    from: draft
    to: cancelled
    trigger: Staff end a draft stock order.
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: 'services-commerce:modules/purchasing/services/persistence/purchase-orders.ts:cancelPurchaseOrder'
    note: 'Individual examples do not exhaustively prove this transition, its guard and side effects.'
  - state_model: STATE-COM-ORD-013
    from: issued
    to: cancelled
    trigger: Staff end an issued stock order without delivery.
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: 'services-commerce:modules/purchasing/services/persistence/purchase-orders.ts:cancelPurchaseOrder'
    note: 'Individual examples do not exhaustively prove this transition, its guard and side effects.'
invariant_coverage:
  - invariant: INV-DOM-COM-ORD-006-01
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#answers
      the retried receipt as found under its key, writing nothing twice
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-02
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#refuses
      a receipt beyond what the line has open (over_receipt) and a receipt against a received order, writing
      nothing
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-03
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#writes,
      in the receipt’s transaction, the receipt movement naming the line, the layer of 60 @ 1000 and the
      capitalize_receipt fact of 60000
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-04
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/db/inventory-cost-layers.table.ts:inventory_cost_layers_remaining_check,
      inventory_cost_layers_receipt_line_check
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-05
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: 'services-commerce:modules/purchasing/db/cost-relief.table.ts:cost_relief_total_check'
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-06
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#lists
      the unposted facts by date, stamps them posted once under Accounting’s reference, and refuses another
      reference on a posted fact
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-07
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#rewrites
      nothing made before the switch: the FIFO relief rows read back unchanged, the receipt layers still
      record fifo
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-08
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#refuses a receipt against the
      received order 409, a receipt line with no quantity 400, and the vendor’s delete 409
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-09
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#replaces the draft at the version
      read with the record exactly as it was read, read-only line columns included, and answers the same lines
      one version on
    note: Broader invariant coverage remains open beyond the concrete examples.
  - invariant: INV-DOM-COM-ORD-006-10
    scenarios: []
    gap: FND-COM-ORD-074
    provenance: unknown
    source: >-
      services-commerce:modules/purchasing/db/purchase-orders.table.ts:purchase_orders_closed_check,
      purchase_orders_cancelled_check
    note: Broader invariant coverage remains open beyond the concrete examples.
workflow_coverage:
  - workflow: WF-COM-ORD-015
    scenarios:
      - ATS-COM-ORD-018-18
    gap: FND-COM-ORD-074
    provenance: proposed
    source:
      - >-
        services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#refuses
        a receipt line whose cost differs from the order line’s without a reason, and takes one with a reason
      - >-
        services-commerce:modules/purchasing/tests/integration/services/receiving/purchasing-flow.integration.spec.js#fills
        the two backorders at the first receipt, oldest first, converting them to committed; the shelf shows
        58 available after
      - >-
        services-commerce:modules/purchasing/tests/e2e/purchasing.e2e.spec.js#lists the facts unposted (the
        two receipts’), stamps them posted under Accounting’s reference, and lists none unposted after
interaction_coverage:
  - with: CAP-COM-ORD-018
    scenarios:
      - ATS-COM-ORD-017-07
unproved_rules: []
---

# Arrange vendor stock purchases: Capability Test Specification

## Coverage

| Rule | Scenario or finding |
|---|---|
| `BR-CAP-COM-ORD-017-01` | `ATS-COM-ORD-017-01` |
| `BR-CAP-COM-ORD-017-02` | `ATS-COM-ORD-017-02` |
| `BR-CAP-COM-ORD-017-03` | `ATS-COM-ORD-017-03` |
| `BR-CAP-COM-ORD-017-04` | `ATS-COM-ORD-017-04`, `ATS-COM-ORD-017-07` |
| `BR-CAP-COM-ORD-017-05` | `ATS-COM-ORD-017-05` |
| `BR-CAP-COM-ORD-017-06` | `ATS-COM-ORD-017-06` |

## Interactions With Related Capabilities

Received stock changes how the remaining commitment can end. An issued purchase order covers one hundred units. Receive ninety, attempt order cancellation and close the remainder.

Crossing workflow examples also cover preparation, commitment and recovery at their service handoffs. Their structured bindings distinguish specified outcomes from executable evidence.
