---
id: CAP-ACC-BAT-015
title: Produce document entries using the applicable accounting method
feature: FEAT-ACC-BAT-03
product_area: accounting
module: batches
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
- inventory CAP-ACC-BAT-012
- inventory RUL-ACC-BAT-023
- inventory RUL-ACC-BAT-029
- inventory RUL-ACC-BAT-030
- inventory RUL-ACC-BAT-031
- inventory RUL-ACC-BAT-032
- inventory RUL-ACC-BAT-035
- inventory RUL-ACC-BAT-039
- inventory RUL-ACC-BAT-060
- inventory RUL-ACC-BAT-064
- inventory RUL-ACC-BAT-068
- journey ACT-ACC-0524
- journey ACT-ACC-0525
- journey ACT-ACC-0534
- journey ACT-ACC-0535
- journey ACT-ACC-0536
- journey ACT-ACC-0553
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
- services-accounting:docs/milestones/ACCT-M3-batch-posting-and-ledger.md#Status history (2026-10-21 09:36, Andrew
  ruled the credit memo on a partly recognised line splits by schedule)
purpose: Posting translates eligible financial documents into the entries appropriate to the unit’s accounting method.
outcomes:
- Applicable documents produce balanced, attributable account movements or generation reasons.
concepts:
- CON-ACC-BAT-003
- CON-ACC-BAT-004
actors:
- ACT-ACC-012
- ACT-ACC-007
surfaces:
- job
permissions: []
rules:
- id: BR-CAP-ACC-BAT-015-01
  proved_by: [ATS-ACC-BAT-015-01, TST-ACC-BAT-031, TST-ACC-BAT-105, TST-ACC-BAT-106, TST-ACC-BAT-135]
  statement: The accounting method determines eligible live-document entries, excluding void documents, memos of
    void invoices and cash-basis invoice entries.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#writes
    one entry per live document, none for the void invoice
  origin: none
- id: BR-CAP-ACC-BAT-015-02
  proved_by: [ATS-ACC-BAT-015-02, TST-ACC-BAT-030, TST-ACC-BAT-130]
  statement: The entry uses its batch’s date and fiscal period and separately retains the source document date.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0550.spec.ts#ACT-ACC-0550
  origin: none
- id: BR-CAP-ACC-BAT-015-03
  proved_by: [ATS-ACC-BAT-014-10, ATS-ACC-BAT-015-03, ATS-ACC-BAT-015-12, TST-ACC-BAT-007, TST-ACC-BAT-105, TST-ACC-BAT-110]
  statement: Accrual invoice entries debit tax-inclusive receivables, credit net revenue or deferred revenue and
    credit each recorded tax to its payable account.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: 'services-accounting:modules/batches/tests/integration/services/posting/rebuilt-tax.integration.spec.js#posts
    the invoice per line: the receivable debited the total with the tax, revenue credited the net, and a tax credit
    per tax line to its account'
  origin: none
- id: BR-CAP-ACC-BAT-015-04
  proved_by: [ATS-ACC-BAT-015-03, TST-ACC-BAT-007, TST-ACC-BAT-105, TST-ACC-BAT-110]
  statement: Credit memos reverse receivable and revenue or deferred revenue, debit memos add those legs, and write-offs
    debit their resolved expense or allowance against receivable.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: 'services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#posts
    the credit memo against the invoice line it reduces: the receivable credited, the revenue debited'
  origin: none
- id: BR-CAP-ACC-BAT-015-05
  proved_by: [ATS-ACC-BAT-015-04, ATS-ACC-BAT-015-14, ATS-ACC-BAT-019-13, TST-ACC-BAT-103, TST-ACC-BAT-129]
  statement: Corrections to partly recognised deferred lines divide their amount between recognised revenue and
    the schedule’s remaining deferred share.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/posting/memo-split-by-schedule.integration.spec.js#posts
    the credit memo of 60.00 as Cr receivable 6000, Dr deferred revenue 3000 and Dr revenue 3000
  origin: services-accounting:docs/milestones/ACCT-M3-batch-posting-and-ledger.md#Status history (2026-10-21 09:36,
    Andrew ruled the credit memo on a partly recognised line splits by schedule)
- id: BR-CAP-ACC-BAT-015-06
  proved_by: [ATS-ACC-BAT-015-05, TST-ACC-BAT-014, TST-ACC-BAT-015, TST-ACC-BAT-032, TST-ACC-BAT-106, TST-ACC-BAT-108, TST-ACC-BAT-127]
  statement: Payment entries debit bank or merchant cash, credit allocated line receivables and place the unapplied
    remainder in unapplied cash, retaining any paid order reference.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: 'services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#posts
    the payment: cash debited its total, the invoice line''s receivable credited the allocation, unapplied cash
    credited the rest'
  origin: none
- id: BR-CAP-ACC-BAT-015-07
  proved_by: [ATS-ACC-BAT-015-05, TST-ACC-BAT-014, TST-ACC-BAT-015, TST-ACC-BAT-032, TST-ACC-BAT-106, TST-ACC-BAT-108, TST-ACC-BAT-127]
  statement: An allocation made after the payment posts creates its own batched entry from unapplied cash to receivable
    and identifies its payment.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: 'services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#posts
    the row as a payment allocation: unapplied cash debited, the line''s receivable (the gala line''s, the unit''s
    default) credited, naming its payment'
  origin: none
- id: BR-CAP-ACC-BAT-015-08
  proved_by: [ATS-ACC-BAT-015-05, TST-ACC-BAT-014, TST-ACC-BAT-015, TST-ACC-BAT-032, TST-ACC-BAT-106, TST-ACC-BAT-108, TST-ACC-BAT-127]
  statement: Manual credits move expense to liability, payment-derived credits move unapplied cash to store-credit
    liability, applications move liability to receivable and reversals mirror those entries.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/unit/rules/credit-application-entry-rules.spec.js#debits the
    credit liability for the total and credits each invoice line’s receivable, in one entry naming the application
  origin: none
- id: BR-CAP-ACC-BAT-015-09
  proved_by: [ATS-ACC-BAT-015-05, TST-ACC-BAT-014, TST-ACC-BAT-015, TST-ACC-BAT-032, TST-ACC-BAT-106, TST-ACC-BAT-108, TST-ACC-BAT-127]
  statement: Refunds and bounced payments credit cash against unapplied cash or credit liability, and reversed allocations
    restore receivable.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: 'services-accounting:modules/batches/tests/integration/services/posting/rebuilt-payments.integration.spec.js#posts
    the bounced check as the money leaving: the bank account credited its total, unapplied cash debited'
  origin: none
- id: BR-CAP-ACC-BAT-015-10
  proved_by: [ATS-ACC-BAT-013-23, ATS-ACC-BAT-015-06, ATS-ACC-BAT-015-11, TST-ACC-BAT-016, TST-ACC-BAT-105, TST-ACC-BAT-127]
  statement: A document depending on another unposted batch errors unless the batches post together, and posting
    records its downstream dependency on the source batch.
  kind: policy
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: 'services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses
    November alone while October is open: November in error, naming the memo''s invoice and October''s status'
  origin: none
- id: BR-CAP-ACC-BAT-015-11
  proved_by: [ATS-ACC-BAT-015-07, TST-ACC-BAT-023, TST-ACC-BAT-098, TST-ACC-BAT-099, TST-ACC-BAT-100]
  statement: Foreign-currency documents use their stored rate and place rounding residue on the last line to balance
    both currencies, with missing rates failing the batch.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/posting/foreign-currency-invoice.integration.spec.js#marks
    the batch in error with the same sentence when posted, and writes no entry
  origin: none
- id: BR-CAP-ACC-BAT-015-12
  proved_by: [ATS-ACC-BAT-015-08, TST-ACC-BAT-107, TST-ACC-BAT-127]
  statement: Cash-basis invoices produce no entry, and allocated payment revenue uses the paid line’s revenue account
    instead of receivable.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/posting/rebuilt-posting-edges.integration.spec.js#posts
    nothing for the invoice, and the payment as cash against the revenue of the line it pays (the frozen account),
    no receivable
  origin: none
- id: BR-CAP-ACC-BAT-015-13
  proved_by: [ATS-ACC-BAT-015-09, TST-ACC-BAT-130]
  statement: Reconciliation requests become individual entries with cash legs for bank and clearing accounts and
    distinct fee, reserve, adjustment and write-off line types, keeping a requests-only batch nonempty.
  kind: calculation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/unit/rules/reconciliation-entry-rules.spec.js#posts a bank line
    and a clearing line as cash lines naming their accounts, debits and credits as stored
  origin: none
- id: BR-CAP-ACC-BAT-015-14
  proved_by: [ATS-ACC-BAT-015-10, ATS-ACC-BAT-015-13, ATS-ACC-BAT-015-15, ATS-ACC-BAT-017-07, TST-ACC-BAT-105]
  statement: Generated entries balance in base and transaction currencies and retain document-line references for
    their source transactions.
  kind: invariant
  enforced_at:
  - service
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#traces
    every line of every entry to a line of a document in the batch
  origin: none
scenarios:
- id: SC-CAP-ACC-BAT-015-01
  given: An accrual batch holds an invoice, a credit memo and a write-off together.
  when: Staff post that batch.
  then: The invoice creates receivable and revenue, the memo reduces both and the write-off clears the remaining
    receivable against expense.
  provenance: documented
  source: services-accounting:docs/milestones/walkthroughs/ACCT-M3-handoff.md#Start here (step 4)
- id: SC-CAP-ACC-BAT-015-02
  given: A September invoice is collected in an October batch.
  when: The batch posts.
  then: The entry uses October’s date and period and retains September as its document date.
  provenance: test
  source: react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0550.spec.ts#ACT-ACC-0550
- id: SC-CAP-ACC-BAT-015-03
  given: A payment relies on an invoice in another unposted batch.
  when: Staff post the payment alone and later post both batches together.
  then: The isolated payment errors on the dependency, while the combined request can post both.
  provenance: test
  source: react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0526.spec.ts#ACT-ACC-0526
edge_cases: []
constraints:
- The carried earlier-product suites provide regression evidence for the native posting rules.
depends_on:
- CAP-ACC-BAT-014
related:
- CAP-ACC-BAT-013
- CAP-ACC-BAT-017
- CAP-ACC-BAT-019
journeys:
- JNY-ACC-BAT-001
- JNY-ACC-BAT-004
open_questions:
- OQ-ACC-BAT-001
evidence:
- 'Pinned services-accounting (f47cb263), examined sources: services/rules/invoice-entry-rules.ts, change-memo-entry-rules.ts,
  credit-entry-rules.ts, credit-application-entry-rules.ts, payment-entry-rules.ts, refund-entry-rules.ts, reconciliation-entry-rules.ts,
  posting-generation.ts, posting-records.ts, transaction-records.ts, related-object-rules.ts, subledger-entry-rules.ts,
  services/engine/posting-documents.ts; tests integration/services/posting/rebuilt-*.integration.spec.js, foreign-currency-*.integration.spec.js,
  memo-split-by-schedule.integration.spec.js, remittance-payments.integration.spec.js, voided-only-batch.integration.spec.js,
  unit/rules/credit-application-entry-rules.spec.js, memo-split-by-schedule.spec.js, voided-documents-posting.spec.js,
  reconciliation-entry-rules.spec.js, unit/defects/invoice-revenue-split-currency.spec.js; unit/carried/batch-posting/**
  (the carried 1.0 posting suites); docs/accounting/batches.md.'
- 'Pinned react-console (baf6dae3), examined sources: journeys ACT-ACC-0517, 0524, 0525, 0526, 0534, 0535, 0550,
  0553.'
controls: [TC-IAM-001, TC-IAM-005, TC-IAM-006, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-LOG-002, TC-LOG-003, TC-LOG-005, TC-PI-005]
exercised_by: [FAS-ACC-BAT-03-01, FAS-ACC-BAT-03-02, FAS-ACC-BAT-03-03, FAS-ACC-BAT-03-05]
suites: [TST-ACC-BAT-007, TST-ACC-BAT-014, TST-ACC-BAT-015, TST-ACC-BAT-016, TST-ACC-BAT-023, TST-ACC-BAT-030, TST-ACC-BAT-031, TST-ACC-BAT-032, TST-ACC-BAT-098, TST-ACC-BAT-099, TST-ACC-BAT-100, TST-ACC-BAT-103, TST-ACC-BAT-105, TST-ACC-BAT-106, TST-ACC-BAT-107, TST-ACC-BAT-108, TST-ACC-BAT-110, TST-ACC-BAT-127, TST-ACC-BAT-129, TST-ACC-BAT-130, TST-ACC-BAT-135]
---

# Produce document entries using the applicable accounting method

## Purpose

Posting translates eligible financial documents into the entries appropriate to the unit’s accounting method.

## How It Works

The engine reads each batch’s eligible documents and the accounting context they need. Document-specific rules build their debit and credit legs. The accounting method determines when an invoice or payment contributes revenue. Related documents establish dependencies on other batches. Stored exchange information supplies conversion for foreign-currency work. Missing prerequisites fail the affected batch, and the generated lines retain source references for review.

## Relationships

- Prerequisite: Resolve posting accounts and retain their snapshots, which addresses the connected batch work.
- Related outcome: Run and monitor a batch posting job, which addresses the connected batch work.
- Related outcome: Protect ledger balance, immutability and workspace isolation, which addresses the connected batch work.
- Related outcome: Plan deferred revenue and adjust its remaining releases, which addresses the connected batch work.
