Repository navigation
Preserve result accounts during year-end closing - #141
Merged
Merged
Conversation
- netResult/transferredResult now come from the debit/credit direction per account, so a result account whose normal side contradicts its class can no longer flip the sign of the result (profit posted as a loss) - preview warns about result accounts with a class/normal-side mismatch - already-transferred warning formats the natural-signed transferredResult - closing dialog executes against the last previewed account and disables Execute when the closing-account field is edited - regression test covering an INCOME account with debit normal side
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.
Year-end closing transfers only the remaining result through 8999 against the selected equity account, preserving individual income and expense balances. Fully transferred results produce no additional closing voucher. Income statements and next-year comparisons retain the year's actual figures, and 8999 is excluded regardless of its configured subgroup.
The dialog and MCP preview separate operating income/expenses (excluding 8999), the year's actual
net_result,transferred_resultalready booked through 8999, andremaining_result. Both preview and closing responses exposeresult_accounts_with_balance_count; the formerresult_account_countfield is removed. Closing responses retain the preview figures, withremaining_resultdescribing the amount posted by that operation.Closing-account defaults live on
LegalForm.defaultResultAccount: 2099 for AB, 2019 for EF/HB/KB, with an unset legal form retaining the AB fallback. The dialog resolves its default in the preview worker; errors are displayed with closing disabled. MCP descriptions derive the defaults from the enum, and preview tokens bind to the resolved account. Explicit overrides remain supported.SIE4 export includes nonzero natural-sign #RES records reconciling with the exported vouchers. Closing metadata records the actual result transfer; only balance-sheet accounts carry forward. The manual explains that an HB/KB result initially lands on partner 1's 2019 and requires manual allocation to the other partners' result or capital accounts.
Regression coverage includes profits/losses, partial/full/excessive prior transfers, actual preview totals and dialog labels, misgrouped 8999 accounts, report comparisons, SIE amounts and reversed activity, legal-form defaults, overrides, and MCP token invalidation. Live Swing checks also verified failed-preview handling. Test teardown restores the home override in finally.
No schema migration or historical ledger rewrite. The correction plan documents the separate audited workflow needed for previously closed years. Automatic new-year equity reallocations remain separate work.
Validation: ./gradlew spotlessApply, ./gradlew codenarcMain, ./gradlew codenarcTest, and ./gradlew build passed. Full suite: 872 tests, 0 failures, 11 skipped.
Dialog screenshots: AB, EF, HB/KB, already transferred result, preview error.
Closes #130.