---
id: CAP-ACC-BKS-008
title: Organize reporting by department and project
feature: FEAT-ACC-BKS-02
product_area: accounting
module: books
revision: 1
status: draft
product_intent: confirmed
implementation_evidence: observed
supersedes:
  - CAP-ACC-CFG-007
  - CAP-ACC-CFG-008
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
  - 'services-accounting:docs/milestones/plans/ACCT-M1-plan.md#2. Scope'
  - 'services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#R16'
  - >-
    services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#Entity
    capabilities (R2-ARCH-001)
purpose: >-
  Accountants classify the unit’s financial work below the level of a separate
  set of books.
outcomes:
  - Reporting dimensions retain their unit and code identities.
  - Display labels follow name corrections immediately.
  - Product references preserve their reporting dimensions.
concepts:
  - CON-ACC-BKS-002
actors:
  - ACT-ACC-001
  - ACT-ACC-002
surfaces:
  - console
  - api
preconditions: []
postconditions: []
permissions:
  - key: accounting.departments.read
    where_checked: api
    scope: tenant
  - key: accounting.departments.create
    where_checked: api
    scope: tenant
  - key: accounting.departments.update
    where_checked: api
    scope: tenant
  - key: accounting.departments.delete
    where_checked: api
    scope: tenant
  - key: accounting.accounting-projects.read
    where_checked: api
    scope: tenant
  - key: accounting.accounting-projects.create
    where_checked: api
    scope: tenant
  - key: accounting.accounting-projects.update
    where_checked: api
    scope: tenant
  - key: accounting.accounting-projects.delete
    where_checked: api
    scope: tenant
rules:
  - id: BR-CAP-ACC-BKS-008-01
    proved_by: [ATS-ACC-BKS-008-01, ATS-ACC-BKS-008-07, TST-ACC-BKS-050, TST-ACC-BKS-070, TST-ACC-BKS-170]
    statement: >-
      Department and project codes are upper-cased and unique in their separate
      collections within a unit; omitted identifiers derive from unit and code,
      and the two collections may share a code.
    kind: validation
    enforced_at:
      - api
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/departments.e2e.spec.js#answers
      400 to a code the unit already has, under the id it derives
    origin: none
  - id: BR-CAP-ACC-BKS-008-02
    proved_by: [ATS-ACC-BKS-008-02, TST-ACC-BKS-044, TST-ACC-BKS-050, TST-ACC-BKS-061]
    statement: A department or project retains its saved business unit and code.
    kind: invariant
    enforced_at:
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/accounting-projects.e2e.spec.js#answers
      409 to a change of code, naming the column
    origin: none
  - id: BR-CAP-ACC-BKS-008-03
    proved_by: [ATS-ACC-BKS-008-03, TST-ACC-BKS-044, TST-ACC-BKS-050]
    statement: >-
      Reads calculate the display name from the current code and name, or the
      code alone for an unnamed project.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/departments.e2e.spec.js#answers
      the new name, and the display name recomputed from it
    origin: none
  - id: BR-CAP-ACC-BKS-008-04
    proved_by: [ATS-ACC-BKS-008-03, TST-ACC-BKS-044, TST-ACC-BKS-050]
    statement: >-
      Departments require names; projects may omit names and may store an end
      date.
    kind: validation
    enforced_at:
      - api
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/accounting-projects.e2e.spec.js#answers
      it with no name, no end date, and the code alone as its display name
    origin: none
  - id: BR-CAP-ACC-BKS-008-05
    proved_by: [ATS-ACC-BKS-008-04, TST-ACC-BKS-080]
    statement: >-
      A product accounting setup referencing a department or project prevents
      its deletion and prevents deletion of its owning unit.
    kind: invariant
    enforced_at:
      - database
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/books/tests/integration/services/persistence/departments.integration.spec.js#refuses
      the delete 409, naming the unit’s products
    origin: none
  - id: BR-CAP-ACC-BKS-008-06
    proved_by: [ATS-ACC-BKS-008-05, TST-ACC-BKS-044]
    statement: >-
      Department and project requests refuse custom-field values because these
      records do not support them.
    kind: validation
    enforced_at:
      - api
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/accounting-projects.e2e.spec.js#answers
      400 to custom field values, which Accounting does not carry yet
    origin: none
  - id: BR-CAP-ACC-BKS-008-07
    proved_by: []
    statement: >-
      Both collections order by code, support unit and activity filters and
      identifier, code or name search, and active-unit filters supply picker
      choices.
    kind: policy
    enforced_at:
      - api
      - service
    must_prove: false
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/departments.e2e.spec.js#answers
      nothing to a picker’s query for a unit whose only department is inactive
    origin: none
  - id: BR-CAP-ACC-BKS-008-08
    proved_by: [ATS-ACC-BKS-008-09]
    statement: >-
      The console scopes both lists to one unit with a single-row toolbar and
      initializes new dimensions with the working unit.
    kind: policy
    enforced_at:
      - console
    must_prove: false
    provenance: documented
    source: 'services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#R16'
    origin: 'services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#R16'
scenarios:
  - id: SC-CAP-ACC-BKS-008-01
    given: The chapter uses an Events department and a Gala project.
    when: >-
      The controller records both and changes the department name to Special
      Events.
    then: The display becomes EVT - Special Events while its identity is retained.
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/departments.e2e.spec.js#answers
      the new name, and the display name recomputed from it
edge_cases: []
constraints: []
depends_on:
  - CAP-ACC-BKS-001
related:
  - CAP-ACC-BKS-005
journeys: []
open_questions: []
evidence:
  - 'Verified source file: services-accounting:aws/accounting.service.ts'
  - >-
    Verified source file:
    services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md
  - >-
    Verified source file:
    services-accounting:docs/milestones/plans/ACCT-M1-plan.md
  - >-
    Verified source file:
    services-accounting:modules/books/db/accounting-projects.table.ts
  - >-
    Verified source file:
    services-accounting:modules/books/db/departments.table.ts
  - >-
    Verified source file:
    services-accounting:modules/books/tests/e2e/accounting-projects.e2e.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/e2e/departments.e2e.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/integration/db/accounting-dimensions.table.integration.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/integration/services/persistence/accounting-projects.integration.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/integration/services/persistence/accounting-projects.queries.integration.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/integration/services/persistence/departments.integration.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/integration/services/persistence/departments.queries.integration.spec.js
  - >-
    Verified source file:
    services-accounting:modules/books/tests/unit/rules/accounting-dimensions.spec.js
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004, TC-DAT-001, TC-DAT-004, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-003]
exercised_by: [FAS-ACC-BKS-02-04, FAS-ACC-BKS-02-05]
suites: [TST-ACC-BKS-044, TST-ACC-BKS-050, TST-ACC-BKS-061, TST-ACC-BKS-070, TST-ACC-BKS-080, TST-ACC-BKS-170]
---

# Organize reporting by department and project

## Purpose

Accountants classify the unit’s financial work below the level of a separate set of books.

## How It Works

The controller opens the department or project list for a unit. They add the reporting code used to classify its financial activity. The code supplies stable identity while the name can be corrected. Product accounting can refer to the dimension when classifying activity. Projects may carry an end date as descriptive information. Removing a used dimension can fail because product setup still depends on it. These records organize reporting within the unit rather than create another set of books.

## Relationships

Product accounting selects these reporting dimensions from the unit’s configuration.
