---
id: TST-ACC-BKS-074
title: Business Units integration suite
kind: integration
product_area: accounting
module: books
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-accounting
files:
  - >-
    modules/books/tests/integration/services/persistence/business-units.integration.spec.js
implements:
  - ATS-ACC-BKS-001-02
  - ATS-ACC-BKS-001-04
  - ATS-ACC-BKS-001-05
  - ATS-ACC-BKS-001-06
  - ATS-ACC-BKS-002-01
  - ATS-ACC-BKS-002-03
  - ATS-ACC-BKS-002-04
  - ATS-ACC-BKS-002-05
  - ATS-ACC-BKS-003-01
  - ATS-ACC-BKS-003-02
  - ATS-ACC-BKS-003-03
  - ATS-ACC-BKS-003-04
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  The suite owns isolated workspace identities and database fixtures; cleanup
  removes only its seeded records.
assertion_bindings:
  - scenario: ATS-ACC-BKS-001-02
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      a change of fiscal-year start month in Rhythm 1.0’s words
  - scenario: ATS-ACC-BKS-001-04
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#defaults
      every setting to Rhythm 1.0’s value and leaves out the fields the create
      did not give
  - scenario: ATS-ACC-BKS-001-05
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#keeps
      the supported currencies when the replacement does not state them
  - scenario: ATS-ACC-BKS-001-05
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#keeps
      the flag when a replacement leaves it out
  - scenario: ATS-ACC-BKS-001-05
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#keeps
      the stored treatment on a replacement that leaves it out
  - scenario: ATS-ACC-BKS-001-05
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#keeps
      the six settings on a replacement that names none of them (the console’s
      unit editor predates them)
  - scenario: ATS-ACC-BKS-001-06
    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
  - scenario: ATS-ACC-BKS-001-06
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#leaves
      no fiscal year, fiscal period or department of the unit behind
  - scenario: ATS-ACC-BKS-001-06
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      a unit that still has accounting projects, naming them, and keeps its
      years and departments
  - scenario: ATS-ACC-BKS-002-01
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#creates
      a unit with Enable Multicurrency off by default
  - scenario: ATS-ACC-BKS-002-01
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      Enable Multicurrency on a create with no supported currency, in Rhythm
      1.0’s words
  - scenario: ATS-ACC-BKS-002-01
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      turning Enable Multicurrency on with no supported currency to keep,
      leaving the unit unchanged
  - scenario: ATS-ACC-BKS-002-03
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      more supported currencies than its bound
  - scenario: ATS-ACC-BKS-002-03
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      a supported currency Accounting does not offer
  - scenario: ATS-ACC-BKS-002-04
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#answers
      each supported currency with its settings, the defaults for one that
      stated none, and the codes beside them
  - scenario: ATS-ACC-BKS-002-05
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#names
      merchant accounts when only a merchant account uses the currency
  - scenario: ATS-ACC-BKS-002-05
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      turning Enable Multicurrency off while a GL account uses a supported
      currency, leaving the unit unchanged
  - scenario: ATS-ACC-BKS-003-01
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      the change 409 naming the period and the count when a batch of the open
      period is posted, leaving the method
  - scenario: ATS-ACC-BKS-003-01
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      a change back as well, and still accepts a replacement that leaves the
      method as it is
  - scenario: ATS-ACC-BKS-003-01
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#does
      not count a posted batch of another period of the unit, or of another unit
  - scenario: ATS-ACC-BKS-003-02
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#takes
      bad_debt_expense on a create that leaves the treatment out
  - scenario: ATS-ACC-BKS-003-02
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#replaces
      the stored treatment on a replacement that states it
  - scenario: ATS-ACC-BKS-003-03
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      a rule that is not whole (a percent without a product, a product without
      an amount, a minimum alone) by the database’s rule
  - scenario: ATS-ACC-BKS-003-03
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      a percent above 100, a negative amount, and a percent that is not a
      decimal of four places
  - scenario: ATS-ACC-BKS-003-04
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js#refuses
      a fee product of another unit, an inactive one and one the tenant does not
      have, naming card_fee_product_id
unmapped: false
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/business-units.integration.spec.js
execution_notes: >-
  The file exists at the pinned revision; this registration records no execution
  result.
---

# Business Units integration suite

## Verification Boundary

The suite exercises books configuration against the migrated local database. Its fixtures and transaction contexts determine the records and service paths under test.

## What This Suite Proves

The individual assertion references identify the acceptance outcomes this file exercises. When a scenario spans several suites, this file supplies only its listed assertions; qualification must include the other bindings and any recorded coverage finding.

## What It Does Not Prove

Local database execution does not prove deployed infrastructure, external provider availability or console behavior. No result is claimed for the pinned revision until the suite runs and its evidence is reviewed.

## Real Dependencies and Test Doubles

PostgreSQL, migrations and the exercised persistence paths are real. Test-owned execution contexts, clocks and local Platform records supply deterministic setup; the file’s imports and fixtures identify any additional doubles.

## Must Not Be Doubled

The database constraints, transaction paths and production persistence functions named by the assertions must remain real. A memory store cannot establish the recorded database proof.
