---
id: DOM-ACC-BAT-005
title: Revenue Recognition Schedule
realises: CON-ACC-BAT-005
product_area: accounting
module: batches
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
owned_by: SVC-ACC-BAT-batches
readable_by: []
lifecycle: STATE-ACC-BAT-005
custom_fields: none
identity: >-
  A revenue plan is keyed by workspace, posting generation and source-derived
  schedule identity. Reposting may repeat the source identity under a new
  generation. Entry position identifies each dated release within its plan.
attributes:
  - name: 'posting, batch and business unit'
    kind: reference
    required: true
    computed: false
    notes: >-
      The owning generation and its collection and financial entity; schedule
      account references are constrained to that entity.
  - name: source document and line
    kind: reference
    required: true
    computed: false
    notes: >-
      The originating deferred document and applicable line; correction
      schedules retain the source context they adjust.
  - name: total
    kind: money
    required: true
    computed: true
    notes: >-
      The generation amount is distributed into persisted entry amounts; no
      header total column exists. Invoice generation currently uses the
      tax-inclusive line amount.
  - name: deferred and revenue accounts
    kind: reference
    required: false
    computed: false
    notes: >-
      Nullable header references. Recognition obtains each required account from
      the entry override or the schedule header.
  - name: revenue splits
    kind: collection
    required: false
    computed: false
    notes: >-
      Bounded allocation data describing the revenue accounts released alongside
      each scheduled amount.
  - name: status
    kind: enum
    required: true
    computed: false
    notes: >-
      Open and Recognized track recognition; Void retires an open plan on
      unposting. Cancelled is retained vocabulary without an established native
      writer.
  - name: entries
    kind: collection
    required: true
    computed: false
    notes: >-
      Persisted dated amounts and per-entry status. Period generation is capped
      at sixty months, and the final release receives rounding residue. Storage
      also permits cancelled entries.
  - name: truncation method
    kind: enum
    required: false
    computed: true
    notes: >-
      A workspace setting used during effective-date memo generation to select
      period or day weighting; it is not a persisted schedule attribute.
  - name: deferred and recognised position
    kind: computed
    required: false
    computed: true
    notes: >-
      Read-derived deferred and released amounts for line inspection and the
      waterfall query.
relationships:
  - to: DOM-ACC-BAT-003
    cardinality: many-to-one
    ownership: A revenue plan belongs to the posting generation that created it.
    cross_service: false
  - to: DOM-ACC-BAT-004
    cardinality: one-to-many
    ownership: >-
      Fiscal recognition ledger entries reference the particular plan entries
      released.
    cross_service: false
invariants:
  - id: INV-DOM-ACC-BAT-005-01
    statement: >-
      Generated releases total the schedule amount, with rounding residue on the
      final release and dates moved forward to the batch date when necessary.
    enforced_at:
      - service
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/posting/rebuilt-deferral.integration.spec.js#writes
      H a schedule of three monthly entries on the firsts of October, November
      and December, summing to 300.00
  - id: INV-DOM-ACC-BAT-005-02
    statement: Period-based generation rejects service periods exceeding sixty months.
    enforced_at:
      - service
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/rules/schedule-truncation.spec.js#refuses
      a service period of more than 60 months
  - id: INV-DOM-ACC-BAT-005-03
    statement: >-
      Correction generation adjusts only the remaining unrecognised share and
      preserves already recognised entries.
    enforced_at:
      - service
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/rules/schedule-truncation.spec.js#inverts
      the nine unrecognised months at half each on their own dates and nothing
      for the recognised three
  - id: INV-DOM-ACC-BAT-005-04
    statement: Unposting marks Open schedules Void while retaining their records.
    enforced_at:
      - service
    provenance: observed
    source: >-
      services-accounting:modules/batches/services/persistence/revenue-recognition-schedules.ts:voidUnrecognizedSchedules
  - id: INV-DOM-ACC-BAT-005-05
    statement: Recognition and unrecognition require the fiscal caller transaction.
    enforced_at:
      - service
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/close/revenue-recognition.integration.spec.js#refuses
      recognition outside a transaction (`transaction-required`)
physical:
  - accounting.revenue_recognition_schedules
  - accounting.revenue_recognition_schedule_entries
  - accounting.revenue_schedule_entries_v
evidence:
  - >-
    services-accounting at f47cb263:
    modules/batches/db/revenue-recognition-schedules.table.ts,
    revenue-schedule-entries.view.ts;
    metadata/revenue-schedule-entries.object.ts;
    services/persistence/revenue-recognition-schedules.ts;
    services/rules/revenue-schedule-rules.ts, deferral-rules.ts;
    services/close/revenue-recognition.ts;
    services/schedules/revenue-schedule-reads.ts;
    aws/api/revenue-schedules.routes.ts; docs/accounting/revenue-schedules.md
---

# Revenue Recognition Schedule

## What It Models

A revenue plan separates initial deferral from later earning. Posting generates dated release amounts, and fiscal accounting turns due releases into ledger entries. Corrections can generate negative plans for the portion still deferred.

## Identity and Attributes

Generation identity allows an original plan and a later replacement to coexist. The attribute rows distinguish persisted release amounts from transient generation settings and read-time positions; neither a header total nor a truncation-method column exists.

## Relationships

The originating posting owns the plan. Fiscal system entries reference released plan entries, while product setup and document context supply the original deferral inputs.

## Invariants

Generation and fiscal persistence enforce the safeguards listed in the invariant rows. Retiring an Open plan does not itself undo earlier recognition, and schedule-level retirement leaves entry statuses unchanged.

## How It Is Stored and Shared

Batch Management stores plans and dated entries. Invoice-line inspection and the deferred-revenue query expose their positions under separate permissions. Fiscal close invokes recognition in-process; workspace export includes surviving plans and entries.

## Open Design Questions

Tax-inclusive schedule generation remains inconsistent with the net deferred credit. Product must also resolve recognition already released when the originating posting is removed and prove the empty-weight correction fallback.
