fix for edge case when balance of a posting account at ending date is zero#8839
Open
mynjj wants to merge 1 commit into
Open
fix for edge case when balance of a posting account at ending date is zero#8839mynjj wants to merge 1 commit into
mynjj wants to merge 1 commit into
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andInit()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