Skip to content

fix for edge case when balance of a posting account at ending date is zero#8839

Open
mynjj wants to merge 1 commit into
releases/28.0from
bugs/tb-totaling-accs-28.0
Open

fix for edge case when balance of a posting account at ending date is zero#8839
mynjj wants to merge 1 commit into
releases/28.0from
bugs/tb-totaling-accs-28.0

Conversation

@mynjj

@mynjj mynjj commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Work item: AB#640627

Summary

Backport of the fix for the edge case where a posting account's balance at the ending date is zero.

The query-based Trial Balance path previously skipped any account/dimension combination whose values netted to zero (CheckAllZero). But the underlying query only returns combinations that actually have entries, so a zero net change still represents real (offsetting) turnover that should be shown. This change inserts every combination the query returns in the first pass, and Init()s the buffer record when the second (opening-balance) pass has to re-create a zero-net-at-end combination, so it no longer inherits stale amounts from the previously processed record.

Changes

  • src/Apps/W1/ExcelReports/App/src/Financials/TrialBalance.Codeunit.al

… zero

Production-only backport for 28.0: keeps every account/dimension combination
that has entries (dropping the CheckAllZero guard) and Init()s the buffer record
when the second pass re-creates a zero-net-at-end combination. Tests are omitted
on 28.0 as the test infrastructure differs from later releases.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mynjj mynjj requested a review from a team June 26, 2026 11:22
@mynjj mynjj requested a review from a team as a code owner June 26, 2026 11:22
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jun 26, 2026
@github-actions github-actions Bot modified the milestone: Version 28.0 Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant