---
id: ATS-ACC-BKS-017
scope: CAP-ACC-BKS-017
product_area: accounting
module: books
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-ACC-BKS-017-01
    title: Initialize settings at the correct version
    level: api
    proves:
      - BR-CAP-ACC-BKS-017-01
      - INV-DOM-ACC-BKS-006-04
    preconditions: The workspace has never saved settings.
    steps: Read defaults and attempt initial saves at versions one and zero.
    expected: >-
      Defaults use version zero; the version-one attempt fails and version zero
      creates version one.
    negative: false
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-099
      - TST-ACC-BKS-098
      - TST-ACC-BKS-052
    provenance: test
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/settings.queries.integration.spec.js#answers
      the defaults at version 0 to a tenant that never saved, not another
      tenant’s row
    category: transition
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/settings.queries.integration.spec.js#answers
        the defaults at version 0 to a tenant that never saved, not another
        tenant’s row
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#refuses
        a first save that is not at version 0
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#answers
        the row the first save inserted, whole, at version 1
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        the defaults at version 0
  - id: ATS-ACC-BKS-017-02
    title: Hold refunds for independent approval
    level: browser
    proves:
      - BR-CAP-ACC-BKS-017-03
    preconditions: Refund approval is enabled.
    steps: Submit the refund request.
    expected: It remains pending for approval by another person.
    negative: false
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-027
    provenance: test
    source: >-
      react-console:acceptance/accounting/playwright/journeys/configuration/ACT-ACC-0047.spec.ts#ACT-ACC-0047
    category: rule
    binding_evidence:
      - >-
        react-console:acceptance/accounting/playwright/journeys/configuration/ACT-ACC-0047.spec.ts#ACT-ACC-0047
  - id: ATS-ACC-BKS-017-03
    title: Distinguish omitted setting semantics
    level: api
    proves:
      - BR-CAP-ACC-BKS-017-05
    preconditions: >-
      Settings select a statement, daily truncation and required service
      periods.
    steps: Save with those values omitted and then explicitly supplied.
    expected: >-
      Truncation and service-period choices persist on omission, statement
      returns to built-in and supplied values take effect.
    negative: false
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-098
    provenance: test
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#keeps
      both when a later save leaves them out, and puts them back to their
      defaults when sent
    category: edge
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#keeps
        both when a later save leaves them out, and puts them back to their
        defaults when sent
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#clears
        the default back to the built-in
  - id: ATS-ACC-BKS-017-04
    title: Default reconciliation and close switches
    level: api
    proves:
      - BR-CAP-ACC-BKS-017-06
    preconditions: A settings record omits both switches.
    steps: Read their stored values.
    expected: >-
      Independent reconciliation finalization defaults on; the
      close-verification default still requires its own execution assertion.
    negative: false
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-069
    provenance: test
    source: >-
      services-accounting:modules/books/tests/integration/db/reconciliation-configuration.table.integration.spec.js#requires
      a second person to finalize a reconciliation when the settings do not say
    category: rule
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/integration/db/reconciliation-configuration.table.integration.spec.js#requires
        a second person to finalize a reconciliation when the settings do not
        say
    assertion_gap: FND-ACC-BKS-078
  - id: ATS-ACC-BKS-017-05
    title: Use settings permissions and versions
    level: api
    proves:
      - BR-CAP-ACC-BKS-017-07
    preconditions: Reader and administrator principals exist.
    steps: Read and replace settings with each and try a stale replacement.
    expected: >-
      The reader can inspect only, valid administration succeeds and the stale
      save fails.
    negative: true
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-051
      - TST-ACC-BKS-098
      - TST-ACC-BKS-052
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates-security.e2e.spec.js#reads
      the settings
    category: permission
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/e2e/document-templates-security.e2e.spec.js#reads
        the settings
      - >-
        services-accounting:modules/books/tests/e2e/document-templates-security.e2e.spec.js#is
        refused the settings’ save 403 permission_missing
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#refuses
        a save at a version the settings no longer have
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        409 to settings saved at a stale version
  - id: ATS-ACC-BKS-017-06
    title: First-save version endpoints
    category: boundary
    level: api
    proves:
      - BR-CAP-ACC-BKS-017-01
    preconditions: >-
      An isolated workspace has records needed for both eligible and ineligible
      examples.
    steps: >-
      Read unsaved settings, attempt a first save at version one, save at
      version zero, then repeat the old version-zero payload.
    expected: >-
      The first and repeated invalid versions are refused, leaving the
      successful first save intact.
    negative: true
    data_needs: >-
      Run-owned records for the stated setup; retain the initial values for
      comparison.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#refuses
      a first save that is not at version 0
    binding_evidence: []
  - id: ATS-ACC-BKS-017-07
    title: Refuse the second replacement of a shared read version
    category: concurrency
    level: api
    proves:
      - BR-CAP-ACC-BKS-016-05
    preconditions: >-
      Two administrators read the same version of the relevant mutable record.
      Each prepares a different otherwise valid replacement.
    steps: >-
      Release both replacement requests from a barrier. Read the record again
      and retry the losing payload at its original version.
    expected: >-
      One replacement commits, the other is stale, and repeating the stale
      request preserves the winning values.
    negative: true
    data_needs: >-
      Run-owned records for the stated setup; retain the initial values for
      comparison.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/books/tests/e2e/payment-terms.e2e.spec.js#answers
      400 naming is_active to a replacement that leaves it out
    interaction_with:
      - CAP-ACC-BKS-016
    binding_evidence: []
  - id: ATS-ACC-BKS-017-08
    title: Changing statement selection moves template protection
    category: interaction
    level: browser
    proves:
      - BR-CAP-ACC-BKS-017-07
      - BR-CAP-ACC-BKS-015-05
    preconditions: >-
      Run-owned records satisfy the preconditions of the referenced capability
      proofs.
    steps: >-
      Select a statement template, attempt its deletion, switch to built-in and
      repeat deletion.
    expected: The settings reference blocks removal until the choice is released.
    negative: false
    data_needs: >-
      Run-owned records for the stated setup; retain the initial values for
      comparison.
    bound_to:
      - TST-ACC-BKS-021
    provenance: test
    source:
      - >-
        services-accounting:modules/books/tests/e2e/document-templates-security.e2e.spec.js#is
        refused the settings’ save 403 permission_missing
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        409 to deleting the business unit’s template, naming the unit
    exercises:
      - CAP-ACC-BKS-017
      - CAP-ACC-BKS-015
    workflows:
      - WF-ACC-BKS-007
    binding_evidence:
      - >-
        react-console:acceptance/accounting/playwright/journeys/configuration/ACT-ACC-0027.spec.ts#ACT-ACC-0027
evidence:
  - >-
    Verified source file:
    react-console:acceptance/accounting/playwright/journeys/configuration/ACT-ACC-0047.spec.ts
  - >-
    Verified source file:
    services-accounting:modules/books/tests/e2e/document-templates-security.e2e.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/integration/db/reconciliation-configuration.table.integration.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/integration/services/persistence/settings.queries.integration.spec.js
product_intent: proposed
coverage:
  rule: 'gap: FND-ACC-BKS-078'
  transition: covered
  validation: 'gap: FND-ACC-BKS-078'
  permission: covered
  edge: covered
  failure: 'gap: FND-ACC-BKS-078'
  boundary: covered
  concurrency: covered
  invariant: 'gap: FND-ACC-BKS-078'
  interaction: covered
coverage_notes:
  rule:
    scenarios:
      - ATS-ACC-BKS-017-02
      - ATS-ACC-BKS-017-04
    provenance: unknown
    source: FND-ACC-BKS-078
    gap: FND-ACC-BKS-078
    reason: >-
      The examples isolate part of this category; the finding records its
      remaining specification or execution boundary.
  transition:
    scenarios:
      - ATS-ACC-BKS-017-01
    provenance: documented
    source:
      - ATS-ACC-BKS-017-01
  validation:
    scenarios: []
    provenance: unknown
    source: FND-ACC-BKS-078
    reason: >-
      No scenario isolates this category for the capability at the pinned
      revision.
    gap: FND-ACC-BKS-078
  permission:
    scenarios:
      - ATS-ACC-BKS-017-05
    provenance: documented
    source:
      - ATS-ACC-BKS-017-05
  edge:
    scenarios:
      - ATS-ACC-BKS-017-03
    provenance: documented
    source:
      - ATS-ACC-BKS-017-03
  failure:
    scenarios: []
    provenance: unknown
    source: FND-ACC-BKS-078
    reason: >-
      No scenario isolates this category for the capability at the pinned
      revision.
    gap: FND-ACC-BKS-078
  boundary:
    scenarios:
      - ATS-ACC-BKS-017-06
    provenance: documented
    source:
      - ATS-ACC-BKS-017-06
  concurrency:
    scenarios:
      - ATS-ACC-BKS-017-07
    provenance: documented
    source:
      - ATS-ACC-BKS-017-07
  invariant:
    scenarios: []
    provenance: unknown
    source: FND-ACC-BKS-078
    reason: >-
      No scenario isolates this category for the capability at the pinned
      revision.
    gap: FND-ACC-BKS-078
  interaction:
    scenarios:
      - ATS-ACC-BKS-017-08
    provenance: documented
    source:
      - ATS-ACC-BKS-017-08
rule_coverage:
  - rule: BR-CAP-ACC-BKS-017-01
    scenarios:
      - ATS-ACC-BKS-017-01
      - ATS-ACC-BKS-017-06
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#refuses
      a first save that is not at version 0
  - rule: BR-CAP-ACC-BKS-017-03
    scenarios:
      - ATS-ACC-BKS-017-02
    provenance: documented
    source: >-
      react-console:acceptance/accounting/playwright/journeys/configuration/ACT-ACC-0047.spec.ts#ACT-ACC-0047
  - rule: BR-CAP-ACC-BKS-017-05
    scenarios:
      - ATS-ACC-BKS-017-03
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/settings.integration.spec.js#keeps
      both when a later save leaves them out, and puts them back to their
      defaults when sent
    gap: FND-ACC-BKS-078
    reason: >-
      Bindings exercise omission semantics, but deferred-line issuance with a
      missing service period is not executed in the registered Books scope.
  - rule: BR-CAP-ACC-BKS-017-06
    scenarios:
      - ATS-ACC-BKS-017-04
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/db/reconciliation-configuration.table.integration.spec.js#requires
      a second person to finalize a reconciliation when the settings do not say
    gap: FND-ACC-BKS-078
  - rule: BR-CAP-ACC-BKS-017-07
    scenarios:
      - ATS-ACC-BKS-017-05
      - ATS-ACC-BKS-017-08
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates-security.e2e.spec.js#is
      refused the settings’ save 403 permission_missing
related_coverage:
  - capability: CAP-ACC-BKS-015
    scenarios:
      - ATS-ACC-BKS-017-08
    provenance: documented
    source: >-
      specs/accounting/books/planning/capabilities/CAP-ACC-BKS-017-set-the-accounting-rules-that-apply-across-the-whole.md
workflow_coverage:
  - workflow: WF-ACC-BKS-007
    interactions:
      - ATS-ACC-BKS-017-08
    provenance: documented
    source: >-
      specs/accounting/books/design/workflows/WF-ACC-BKS-007-resolve-and-render-a-documents-template.md
    gap: FND-ACC-BKS-078
coverage_interpretation: >-
  Covered means a specified scenario exists. Proposed scenarios and registered
  bindings do not establish a passed run or verified conformance.
invariant_coverage:
  - invariant: INV-DOM-ACC-BKS-004-01
    scenarios:
      - ATS-ACC-BKS-014-01
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      409 to a change of kind, which is write-once
  - invariant: INV-DOM-ACC-BKS-004-02
    scenarios:
      - ATS-ACC-BKS-014-02
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      400 naming the line and column of Liquid that cannot be read
  - invariant: INV-DOM-ACC-BKS-004-03
    scenarios:
      - ATS-ACC-BKS-014-03
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/db/document-templates.table.integration.spec.js#refuses
      a statement without its e-mail (Rhythm 1.0’s V6)
  - invariant: INV-DOM-ACC-BKS-004-04
    scenarios:
      - ATS-ACC-BKS-014-05
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      409 to a replacement of a built-in
  - invariant: INV-DOM-ACC-BKS-004-05
    scenarios:
      - ATS-ACC-BKS-014-09
      - ATS-ACC-BKS-015-05
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      409 to deleting the business unit’s template, naming the unit
  - invariant: INV-DOM-ACC-BKS-004-06
    scenarios:
      - ATS-ACC-BKS-015-02
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
      an inactive template named explicitly, in Rhythm 1.0’s words
  - invariant: INV-DOM-ACC-BKS-006-01
    scenarios:
      - ATS-ACC-BKS-012-01
      - ATS-ACC-BKS-012-02
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/payment-methods.integration.spec.js#refuses
      to be deactivated, 409 payment_method_system
  - invariant: INV-DOM-ACC-BKS-006-02
    scenarios:
      - ATS-ACC-BKS-012-03
      - ATS-ACC-BKS-012-04
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/payment-methods.integration.spec.js#refuses
      an offline method offered in the portal, naming the rule
  - invariant: INV-DOM-ACC-BKS-006-03
    scenarios:
      - ATS-ACC-BKS-011-03
      - ATS-ACC-BKS-013-06
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/tax-classes.integration.spec.js#translates
      the refusal of each restrict foreign key to a tax class into a 409 naming
      it, the invoice lines among them
  - invariant: INV-DOM-ACC-BKS-006-04
    scenarios:
      - ATS-ACC-BKS-017-01
    provenance: documented
    source: >-
      services-accounting:modules/books/db/settings.table.ts:settings_template_references_trigger
  - invariant: INV-DOM-ACC-BKS-006-05
    scenarios:
      - ATS-ACC-BKS-018-10
    provenance: documented
    source: >-
      services-accounting:modules/maintenance/db/schedules.table.ts;
      services-accounting:modules/maintenance/aws/lambda/CONSUMER.ts:handler;
      services-accounting:package-lock.json
  - invariant: INV-DOM-ACC-BKS-006-06
    scenarios:
      - ATS-ACC-BKS-018-05
      - ATS-ACC-BKS-018-07
    provenance: documented
    source: >-
      services-accounting:modules/maintenance/tests/integration/services/scheduling/schedules-end-to-end.integration.spec.js#pauses
      the schedule after the fifth failure in a row
  - invariant: INV-DOM-ACC-BKS-006-07
    scenarios:
      - ATS-ACC-BKS-019-04
    provenance: documented
    source: >-
      services-accounting:modules/maintenance/tests/integration/db/declaration-completeness.integration.spec.js#leaves
      no tenant-keyed table undeclared
  - invariant: INV-DOM-ACC-BKS-006-08
    scenarios:
      - ATS-ACC-BKS-019-05
    provenance: documented
    source: >-
      services-accounting:modules/maintenance/tests/integration/services/exports/seed-everything.integration.spec.js#stops
      a batch whose record carries a Stripe secret’s shape, blocked with nothing
      staged
  - invariant: INV-DOM-ACC-BKS-006-09
    scenarios:
      - ATS-ACC-BKS-019-06
    provenance: documented
    source: >-
      services-accounting:modules/maintenance/tests/unit/lifecycle/tenant-availability.spec.js#serves
      only an active tenant that is not disabled, and refuses every other
      combination
permission_coverage:
  - key: accounting.settings.read
    where_checked: api
    scenarios:
      - ATS-ACC-BKS-017-05
    provenance: documented
    source: >-
      specs/accounting/books/planning/capabilities/CAP-ACC-BKS-017-set-the-accounting-rules-that-apply-across-the-whole.md
  - key: accounting.settings.update
    where_checked: api
    scenarios:
      - ATS-ACC-BKS-017-05
    provenance: documented
    source: >-
      specs/accounting/books/planning/capabilities/CAP-ACC-BKS-017-set-the-accounting-rules-that-apply-across-the-whole.md
reviewed_at: '2026-10-23'
---

# Set accounting policy shared by the workspace: Capability Test Specification

## Coverage

- Initialize settings at the correct version.
- Hold refunds for independent approval.
- Distinguish omitted setting semantics.
- Default reconciliation and close switches.
- Use settings permissions and versions.

The structured coverage map distinguishes specified examples from remaining findings. Proposed examples require executable proof before qualification.

## Interactions With Related Capabilities

- Changing statement selection moves template protection.

Related-capability and workflow references identify the seams each scenario exercises. The lifecycle coverage record retains transitions that still need individual proof.

## Binding Review

The pinned service and browser assertions support the registered bindings. Original test references remain beside each scenario so partial evidence and unresolved conformance remain reviewable.
