[main] bug 642230 - Enhance FA General Report logic and add tests for Tax Deprec. Group and FA Posting Group handling#9687
Merged
DavidHolusa merged 5 commits intoJul 23, 2026
Conversation
…nd FA Posting Group handling
…643230-main-DeletingFAPostGroupFromFACard
…nd FA Posting Group handling
…s://github.com/microsoft/BCApps into bugs/643230-main-DeletingFAPostGroupFromFACard
Alexander-Ya
approved these changes
Jul 23, 2026
DavidHolusa
enabled auto-merge
July 23, 2026 12:14
ventselartur
approved these changes
Jul 23, 2026
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.
What & why
The SetFAPostingGroup procedure in codeunit "FA General Report" (and the analogous SetFATaxDeprGroup in CZ localization codeunit "FA General Report CZF") could overwrite the "FA Posting Group" (or "Tax Deprec. Group Code CZF") on the Fixed Asset card with a blank value. This happened when the related FA Depreciation Book record had an empty posting group — the code only checked whether the values differed, without verifying that the source value was non-blank. As a result, running reports like "Fixed Asset - G/L Analysis" with Group Totals set to "FA Posting Group" (or "Tax Depreciation Group") would silently clear the field on the FA card.
The fix adds a guard condition (FADeprBook."FA Posting Group" <> '') (and (FADepreciationBook."Tax Deprec. Group Code CZF" <> '') for CZ) so that the field is only updated when the depreciation book carries a meaningful value. Direct unit tests for both SetFAPostingGroup and SetFATaxDeprGroup are added to cover the regression.
Linked work
Fixes AB#643230
How I validated this
What I tested and the outcome
Risk & compatibility
None. The change is additive — it only prevents a destructive side effect (clearing a field). No breaking changes, no data migration needed, no new permissions required. The guard condition is consistent with the existing pattern where other "Set*" procedures in the same codeunit already validate before modifying.