---
id: ATS-ACC-BKS-015
scope: CAP-ACC-BKS-015
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-015-01
    title: Resolve explicit and configured choices
    level: unit
    proves:
      - BR-CAP-ACC-BKS-015-01
    preconditions: Unit templates and a workspace statement default exist.
    steps: 'Resolve every kind with explicit, configured and empty choices.'
    expected: 'Resolution follows the explicit, configured and applicable built-in order.'
    negative: false
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-165
    provenance: test
    source: >-
      services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#uses
      the tenant template named, over the business unit’s
    category: rule
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#uses
        the tenant template named, over the business unit’s
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#uses
        the unit’s invoice template
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#uses
        the tenant’s default statement template from the settings
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#uses
        the built-in invoice when nothing else is configured
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#uses
        the QuickBooks format for a QuickBooks unit
  - id: ATS-ACC-BKS-015-02
    title: Reject unusable explicit choices
    level: unit
    proves:
      - BR-CAP-ACC-BKS-015-02
      - BR-CAP-ACC-BKS-015-06
      - INV-DOM-ACC-BKS-004-06
    preconditions: 'Missing, inactive and wrong-kind templates are supplied.'
    steps: Resolve them explicitly and resolve an inactive configured fallback.
    expected: >-
      Explicit failures are refused; the inactive fallback is passed over for
      built-in content.
    negative: true
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-165
    provenance: test
    source: >-
      services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
      an inactive template named explicitly, in Rhythm 1.0’s words
    category: failure
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
        an inactive template named explicitly, in Rhythm 1.0’s words
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
        a tenant template of another kind
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
        a template the tenant does not have
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
        an inactive statement template named explicitly, which Rhythm 1.0
        rendered
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#passes
        over an inactive template the unit names, to the built-in
  - id: ATS-ACC-BKS-015-03
    title: Require a usable download format
    level: unit
    proves:
      - BR-CAP-ACC-BKS-015-03
    preconditions: QuickBooks Online and Other units have no download template.
    steps: Resolve their downloads and a download with no unit.
    expected: Each unresolved-format request fails.
    negative: true
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-165
    provenance: test
    source: >-
      services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
      a download for a QuickBooks Online unit, whose entries Rhythm 1.0 pushed
      through its API
    category: failure
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
        a download for a QuickBooks Online unit, whose entries Rhythm 1.0 pushed
        through its API
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
        a download for a unit whose package has no format and no template
        (Rhythm 1.0’s V19)
      - >-
        services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
        a download resolved without a business unit
  - id: ATS-ACC-BKS-015-04
    title: Validate stored selections
    level: api
    proves:
      - BR-CAP-ACC-BKS-015-04
      - INV-DOM-ACC-BKS-001-07
    preconditions: >-
      Templates include different kinds, inactive records, a foreign-workspace
      record and built-ins.
    steps: Choose them for unit documents and the statement default.
    expected: >-
      Only matching active local customer templates are accepted, with invalid
      fields identified.
    negative: true
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-052
      - TST-ACC-BKS-051
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      400 to a business unit naming a template of another kind
    category: validation
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        400 to a business unit naming a template of another kind
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        400 to a business unit naming an inactive template
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        400 to a business unit naming a built-in, which null already means
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        400 to settings naming a template that is not a statement
      - >-
        services-accounting:modules/books/tests/e2e/document-templates-security.e2e.spec.js#answers
        400 in tenant B to a business unit naming tenant A’s template
  - id: ATS-ACC-BKS-015-05
    title: Show and protect template users
    level: api
    proves:
      - BR-CAP-ACC-BKS-015-05
      - INV-DOM-ACC-BKS-004-05
    preconditions: Two units and statement settings refer to templates.
    steps: Read usage and attempt deletion and deactivation.
    expected: >-
      Users appear in reads and referenced templates cannot be removed or
      disabled.
    negative: true
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-052
      - TST-ACC-BKS-082
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#lists
      each template with who uses it: the unit by id and name, the settings
    category: invariant
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#lists
        each template with who uses it: the unit by id and name, the settings
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/document-templates.integration.spec.js#refuses
        deleting a template two units use, naming both
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        409 to deleting the default statement template, naming the settings
      - >-
        services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
        409 to deactivating the business unit’s template
  - id: ATS-ACC-BKS-015-06
    title: Clear a unit’s custom content choice
    level: api
    proves:
      - BR-CAP-ACC-BKS-015-07
    preconditions: The unit names an invoice template.
    steps: Replace the unit while omitting that choice.
    expected: Built-in selection is restored and the freed template becomes removable.
    negative: false
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-082
    provenance: test
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/document-templates.integration.spec.js#returns
      a unit to the built-in when a replacement leaves its reference out
    category: transition
    binding_evidence:
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/document-templates.integration.spec.js#returns
        a unit to the built-in when a replacement leaves its reference out
      - >-
        services-accounting:modules/books/tests/integration/services/persistence/document-templates.integration.spec.js#deletes
        a template once nothing uses it
  - id: ATS-ACC-BKS-015-07
    title: Release content only after removing its assignment
    level: browser
    proves:
      - AS-JNY-ACC-BKS-004-03
    preconditions: The chapter uses a customer invoice template.
    steps: 'Delete and deactivate it, clear the choice, then delete it.'
    expected: Usage blocks both initial attempts; removing usage permits deletion.
    negative: true
    data_needs: The setup needs no extra fixture records.
    bound_to:
      - TST-ACC-BKS-020
    provenance: test
    source: >-
      react-console:acceptance/accounting/playwright/journeys/configuration/ACT-ACC-0026.spec.ts#ACT-ACC-0026
    category: interaction
    binding_evidence:
      - >-
        react-console:acceptance/accounting/playwright/journeys/configuration/ACT-ACC-0026.spec.ts#ACT-ACC-0026
  - id: ATS-ACC-BKS-015-08
    title: Exercise the grants for select templates for business documents
    category: permission
    level: api
    proves:
      - BR-CAP-ACC-BKS-016-01
    preconditions: >-
      An application-authorized reader and administrator share the run-owned
      setup. A third principal lacks the relevant resource grant.
    steps: >-
      Read the relevant configuration as the reader, attempt each supported
      mutation, then repeat with the matching administrator grants. Repeat the
      reads without their resource grants.
    expected: >-
      The permission outcomes match the cited authorization rule, and refused
      mutations leave every configured value unchanged.
    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/configuration-security.e2e.spec.js#is
      refused the create 403 permission_missing
    permissions_exercised:
      - accounting.business-units.update
      - accounting.settings.update
      - accounting.document-templates.read
    binding_evidence: []
    supporting_tests: []
  - id: ATS-ACC-BKS-015-09
    title: No configured content at resolution
    category: boundary
    level: api
    proves:
      - BR-CAP-ACC-BKS-015-01
    preconditions: >-
      An isolated workspace has records needed for both eligible and ineligible
      examples.
    steps: >-
      Resolve each document kind with no explicit or configured customer choice;
      include each supported software-package download.
    expected: >-
      Each result follows the referenced resolution rule or its documented
      no-format refusal.
    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/unit/document-templates/resolution.spec.js#uses
      the unit’s invoice template
    binding_evidence: []
  - id: ATS-ACC-BKS-015-10
    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-015-11
    title: Statement choice and settings omission change usage together
    category: interaction
    level: browser
    proves:
      - BR-CAP-ACC-BKS-015-05
      - BR-CAP-ACC-BKS-017-05
    preconditions: >-
      Run-owned records satisfy the preconditions of the referenced capability
      proofs.
    steps: >-
      Choose a statement default, omit that choice during a settings
      replacement, inspect template usage and delete the released template.
    expected: >-
      The replacement restores built-in selection and releases the old content
      for removal.
    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.e2e.spec.js#answers
        409 to deleting the business unit’s template, naming the unit
      - >-
        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
    exercises:
      - CAP-ACC-BKS-015
      - CAP-ACC-BKS-017
    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-0026.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/services/persistence/document-templates.integration.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js
product_intent: proposed
state_transition_coverage:
  - state_model: STATE-ACC-BKS-003
    from: absent
    to: active
    trigger: Create active content or make a copy
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#copies
      a built-in into a new, active tenant template with the built-in’s content
    scenarios:
      - ATS-ACC-BKS-014-05
  - state_model: STATE-ACC-BKS-003
    from: built-in
    to: active
    trigger: Copy built-in content
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#copies
      a built-in into a new, active tenant template with the built-in’s content
    scenarios:
      - ATS-ACC-BKS-014-05
  - state_model: STATE-ACC-BKS-003
    from: active
    to: in use
    trigger: Select the template
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      400 to a business unit naming an inactive template
    scenarios:
      - ATS-ACC-BKS-015-04
  - state_model: STATE-ACC-BKS-003
    from: in use
    to: active
    trigger: Release every configuration selection
    provenance: test
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/document-templates.integration.spec.js#returns
      a unit to the built-in when a replacement leaves its reference out
    scenarios:
      - ATS-ACC-BKS-015-06
  - state_model: STATE-ACC-BKS-003
    from: active
    to: inactive
    trigger: Deactivate unused content
    provenance: observed
    source: >-
      services-accounting:modules/books/db/document-templates.table.ts:document_templates_reference_guard_trigger
    scenarios: []
    gap: FND-ACC-BKS-076
  - state_model: STATE-ACC-BKS-003
    from: inactive
    to: active
    trigger: Reactivate content
    provenance: observed
    source: >-
      services-accounting:modules/books/services/persistence/document-templates.ts
    scenarios: []
    gap: FND-ACC-BKS-076
  - state_model: STATE-ACC-BKS-003
    from: active
    to: deleted
    trigger: Delete unused active content
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      409 to deleting the business unit’s template, naming the unit
    scenarios:
      - ATS-ACC-BKS-015-07
  - state_model: STATE-ACC-BKS-003
    from: inactive
    to: deleted
    trigger: Delete inactive content
    provenance: observed
    source: >-
      services-accounting:modules/books/services/persistence/document-templates.ts
    scenarios: []
    gap: FND-ACC-BKS-076
  - state_model: STATE-ACC-BKS-003
    from: absent
    to: inactive
    trigger: Create inactive content
    provenance: observed
    source: >-
      services-accounting:modules/books/services/persistence/document-templates.ts:createDocumentTemplate
    scenarios: []
    gap: FND-ACC-BKS-076
coverage:
  rule: covered
  transition: covered
  validation: covered
  permission: covered
  edge: 'gap: FND-ACC-BKS-076'
  failure: covered
  boundary: covered
  concurrency: covered
  invariant: covered
  interaction: covered
coverage_notes:
  rule:
    scenarios:
      - ATS-ACC-BKS-015-01
    provenance: documented
    source:
      - ATS-ACC-BKS-015-01
  transition:
    scenarios:
      - ATS-ACC-BKS-015-06
    provenance: documented
    source:
      - ATS-ACC-BKS-015-06
  validation:
    scenarios:
      - ATS-ACC-BKS-015-04
    provenance: documented
    source:
      - ATS-ACC-BKS-015-04
  permission:
    scenarios:
      - ATS-ACC-BKS-015-08
    provenance: documented
    source:
      - ATS-ACC-BKS-015-08
  edge:
    scenarios: []
    provenance: unknown
    source: FND-ACC-BKS-076
    reason: >-
      No scenario isolates this category for the capability at the pinned
      revision.
    gap: FND-ACC-BKS-076
  failure:
    scenarios:
      - ATS-ACC-BKS-015-02
      - ATS-ACC-BKS-015-03
    provenance: documented
    source:
      - ATS-ACC-BKS-015-02
      - ATS-ACC-BKS-015-03
  boundary:
    scenarios:
      - ATS-ACC-BKS-015-09
    provenance: documented
    source:
      - ATS-ACC-BKS-015-09
  concurrency:
    scenarios:
      - ATS-ACC-BKS-015-10
    provenance: documented
    source:
      - ATS-ACC-BKS-015-10
  invariant:
    scenarios:
      - ATS-ACC-BKS-015-05
    provenance: documented
    source:
      - ATS-ACC-BKS-015-05
  interaction:
    scenarios:
      - ATS-ACC-BKS-015-07
      - ATS-ACC-BKS-015-11
    provenance: documented
    source:
      - ATS-ACC-BKS-015-07
      - ATS-ACC-BKS-015-11
rule_coverage:
  - rule: BR-CAP-ACC-BKS-015-01
    scenarios:
      - ATS-ACC-BKS-015-01
      - ATS-ACC-BKS-015-09
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#uses
      the unit’s invoice template
  - rule: BR-CAP-ACC-BKS-015-02
    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
  - rule: BR-CAP-ACC-BKS-015-03
    scenarios:
      - ATS-ACC-BKS-015-03
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
      a download for a QuickBooks Online unit, whose entries Rhythm 1.0 pushed
      through its API
  - rule: BR-CAP-ACC-BKS-015-04
    scenarios:
      - ATS-ACC-BKS-015-04
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      400 to a business unit naming an inactive template
  - rule: BR-CAP-ACC-BKS-015-05
    scenarios:
      - ATS-ACC-BKS-015-05
      - ATS-ACC-BKS-015-11
    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
  - rule: BR-CAP-ACC-BKS-015-06
    scenarios:
      - ATS-ACC-BKS-015-02
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/unit/document-templates/resolution.spec.js#refuses
      an inactive statement template named explicitly, which Rhythm 1.0 rendered
  - rule: BR-CAP-ACC-BKS-015-07
    scenarios:
      - ATS-ACC-BKS-015-06
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/document-templates.integration.spec.js#returns
      a unit to the built-in when a replacement leaves its reference out
related_coverage:
  - capability: CAP-ACC-BKS-017
    scenarios:
      - ATS-ACC-BKS-015-11
    provenance: documented
    source: >-
      specs/accounting/books/planning/capabilities/CAP-ACC-BKS-015-choose-which-template-each-business-units-documents-use.md
workflow_coverage:
  - workflow: WF-ACC-BKS-002
    interactions: []
    provenance: documented
    source: >-
      specs/accounting/books/design/workflows/WF-ACC-BKS-002-replace-a-business-units-settings.md
    gap: FND-ACC-BKS-076
  - workflow: WF-ACC-BKS-007
    interactions:
      - ATS-ACC-BKS-015-11
    provenance: documented
    source: >-
      specs/accounting/books/design/workflows/WF-ACC-BKS-007-resolve-and-render-a-documents-template.md
    gap: FND-ACC-BKS-076
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-001-01
    scenarios:
      - ATS-ACC-BKS-001-02
    provenance: documented
    source: >-
      services-accounting:modules/books/db/business-units.table.ts:business_units_freeze_trigger
  - invariant: INV-DOM-ACC-BKS-001-02
    scenarios:
      - ATS-ACC-BKS-001-03
      - ATS-ACC-BKS-001-11
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/fiscal-years.integration.spec.js#gives
      the new unit exactly its two years, the one containing today and the next
  - invariant: INV-DOM-ACC-BKS-001-03
    scenarios:
      - ATS-ACC-BKS-002-03
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/e2e/business-units.e2e.spec.js#answers
      400 to a supported currency named twice, in Rhythm 1.0’s words
  - invariant: INV-DOM-ACC-BKS-001-04
    scenarios:
      - ATS-ACC-BKS-002-05
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/e2e/business-units.e2e.spec.js#answers
      409 naming the currency, the unit and the kinds of account that use it
  - invariant: INV-DOM-ACC-BKS-001-05
    scenarios:
      - ATS-ACC-BKS-004-02
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/exchange-rates.integration.spec.js#refuses
      changing the unit, the currency or the day: a rate’s identity is
      write-once
  - invariant: INV-DOM-ACC-BKS-001-06
    scenarios:
      - ATS-ACC-BKS-003-03
      - ATS-ACC-BKS-003-04
    provenance: documented
    source: >-
      services-accounting:modules/books/services/persistence/business-units.ts:assertCardFeeRule;
      services-accounting:modules/books/db/business-units.table.ts:business_units_card_fee_rule_check
  - invariant: INV-DOM-ACC-BKS-001-07
    scenarios:
      - ATS-ACC-BKS-015-04
    provenance: documented
    source: >-
      services-accounting:modules/books/db/business-units.table.ts:business_units_template_references_trigger
  - invariant: INV-DOM-ACC-BKS-001-08
    scenarios:
      - ATS-ACC-BKS-001-06
    provenance: documented
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      a unit with GL, bank and merchant accounts, naming all three
  - 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
permission_coverage:
  - key: accounting.business-units.update
    where_checked: api
    scenarios:
      - ATS-ACC-BKS-015-08
    provenance: documented
    source: >-
      specs/accounting/books/planning/capabilities/CAP-ACC-BKS-015-choose-which-template-each-business-units-documents-use.md
    execution_gap: FND-ACC-BKS-076
  - key: accounting.settings.update
    where_checked: api
    scenarios:
      - ATS-ACC-BKS-015-08
    provenance: documented
    source: >-
      specs/accounting/books/planning/capabilities/CAP-ACC-BKS-015-choose-which-template-each-business-units-documents-use.md
    execution_gap: FND-ACC-BKS-076
  - key: accounting.document-templates.read
    where_checked: api
    scenarios:
      - ATS-ACC-BKS-015-08
    provenance: documented
    source: >-
      specs/accounting/books/planning/capabilities/CAP-ACC-BKS-015-choose-which-template-each-business-units-documents-use.md
    execution_gap: FND-ACC-BKS-076
reviewed_at: '2026-10-23'
---

# Select templates for business documents: Capability Test Specification

## Coverage

- Resolve explicit and configured choices.
- Reject unusable explicit choices.
- Require a usable download format.
- Validate stored selections.
- Show and protect template users.
- Reject unusable explicit choices.
- Clear a unit’s custom content choice.

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

## Interactions With Related Capabilities

- Release content only after removing its assignment.
- Statement choice and settings omission change usage together.

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.
