Fixed: Display contra accounts on balance sheet as negative values (OFBIZ-12754)#586
Closed
danwatford wants to merge 1 commit into
Closed
Fixed: Display contra accounts on balance sheet as negative values (OFBIZ-12754)#586danwatford wants to merge 1 commit into
danwatford wants to merge 1 commit into
Conversation
…FBIZ-12754) Convert the ending balances read from GlAccountHistory for contra accounts from credit to debit values by negating them. This ensure they correctly reduce the value of the asset accounts they correspond to.
|
Kudos, SonarCloud Quality Gate passed! |
gilPts
reviewed
Feb 8, 2023
| // to. These contra accounts shall be listed in the asset section of the balance sheet with the intention of | ||
| // reducing overall asset values. We therefore negate the opening credit balance of the contra account, treating | ||
| // it as if it was an asset account with a negative value. | ||
| def endingBalance = lastTimePeriodHistory.getBigDecimal("endingBalance").negate() |
Contributor
There was a problem hiding this comment.
It is better to declare the good type when known
Suggested change
| def endingBalance = lastTimePeriodHistory.getBigDecimal("endingBalance").negate() | |
| BigDecimal endingBalance = lastTimePeriodHistory.getBigDecimal("endingBalance").negate() |
Contributor
Author
|
Closing this PR as fixes built on top of the recent refactoring of BalanceSheet.groovy will be brought in from trunk instead. |
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.








NOTE: This PR is for Release 22.01
Convert the ending balances read from GlAccountHistory for contra accounts from credit to debit values by negating them. This ensure they correctly reduce the value of the asset accounts they correspond to.