fix for edge case when balance of a posting account at ending date is zero#8838
Open
mynjj wants to merge 4 commits into
Open
fix for edge case when balance of a posting account at ending date is zero#8838mynjj wants to merge 4 commits into
mynjj wants to merge 4 commits into
Conversation
…Data The buffer parameter of InsertTrialBalanceReportData is non-temporary, so the test's local record cannot be temporary; AA0237 forbids the Temp prefix on a non-temporary variable. Rename to TrialBalanceData to match the rest of the file. 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#640628
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, so the second (opening-balance) pass can correctly adjust those that also have an opening balance — preserving correct debit/credit splits when the end balance nets to zero.Changes
src/Apps/W1/ExcelReports/App/src/Financials/TrialBalance.Codeunit.alsrc/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.alTests updated/added:
QueryPathIncludesAccountsThatNetToZeroQueryPathReportsCorrectDebitCreditSplitsForZeroEndBalanceCherry-picked from
bugs/tb-totaling-accs(commits470ad7c8,d24a08cf,09e70035).