bcquality/microsoft/knowledge/finance/preserve-journal-batch-document-balance.md
Jesper Schulz-Wedde 7c17aa3ab8 Fix Finance review applicability and ownership boundaries
Remove application-area gating and later VAT-field dependencies, align dynamic shared conventions, separate SCM ownership, and keep journal examples focused on the intended invariant.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-17 18:10:21 +02:00

2.8 KiB

bc-version domain keywords technologies countries application-area
all
finance
force-doc-balance
gen-journal-template
gen-jnl-post-batch
runwithcheck
document-no
posting-date
balancing
al
w1
all

Preserve the journal batch's document-balancing policy

Description

A balanced G/L total does not prove that a general-journal batch satisfies its template's document-balancing policy. "Gen. Jnl.-Post Batch" checks balances at posting-date boundaries and, when the journal template's Force Doc. Balance is enabled, document-type/document-number boundaries. A loop over "Gen. Jnl.-Post Line".RunWithCheck does not reproduce these batch-level checks.

Best Practice

Post normal persisted general-journal batches through their owning batch workflow. Keep balancing lines in the appropriate document/date group when the template requires it. The examples use two LCY G/L lines: opposite amounts under different document numbers are not a document-balanced transfer when Force Doc. Balance is true; the good example groups them under one document and retains the batch checks.

Do not claim every document must always balance: when that template option is false, the supported workflow can allow document imbalance while still checking the required aggregate balances. Standalone self-balancing line posting and purpose-built posting engines that demonstrably own equivalent aggregate policies are not prohibited. A RunWithCheck call or loop alone is not sufficient evidence of a defect.

See sample: preserve-journal-batch-document-balance.good.al.

Anti Pattern

Replace a normal persisted journal batch's posting path with per-line posting or only an aggregate-total check, bypassing a demonstrated template/document/date policy. For the document-imbalance finding, require evidence that Force Doc. Balance applies and that separate document groups can be unbalanced; do not infer the setting from its name or a comment alone.

See sample: preserve-journal-batch-document-balance.bad.al.

References