-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option --cumulative for hledger aregister
#2077
Comments
I thought it would be an easy addition since |
hledger:Hledger.Cli.Commands.* (Register.hs, Aregister, etc) are just the "front end" of commands. Usually they call one or more generic reports implemented in hledger-lib:Hledger.Reports (PostingsReport, AccountTransactionsReport etc). So eg in PostingsReport.hs you can see postingsReport checking balanceaccum_, which comes from the ReportOpts argument, which was gathered from the raw CLI arguments in main. To navigate the code, I can recommend VS Code + HLS. Otherwise an editor with up to date tags file or good project-wide search. Hope it helps.
… On Aug 27, 2023, at 19:31, thielema ***@***.***> wrote:
I thought it would be an easy addition since Aregister.hs already contains out-commented cumulative and historical options and Register.hs already supports cumulative totals. However, after adding the options they are still ignored.
Additionally I do not understand how Register.hs sets cumulative as default, because it mentions cumulative only in the flag section of Register.registermode and nowhere else and def :: BalanceAccumulation is defined as PerPeriod.
I can change the line in aregister.ropts' to balanceaccum_= Cumulative and get cumulative totals. Thus it seems to work in principle, but somehow the option cumulative is not translated to Cumulative, although balanceAccumulationOverride says how to do it.
—
Reply to this email directly, view it on GitHub <#2077 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAACPIEOLVEODXVPSEM5VJDXXOHAXANCNFSM6AAAAAA4AO4KAY>.
You are receiving this because you are subscribed to this thread.
|
I found this old PR of yours. Is it still a feature that's needed / worth the effort ? |
Excuse me, not a PR but rather a discussion issue. |
On Tue, 24 Sep 2024, Simon Michael wrote:
Excuse me, not a PR but rather a discussion issue.
It is still an issue. I currently use a local patch because I did not find
a way to properly implement the feature. Currently postponed in favor of
the table export issues.
|
I like to have support for a cumulative running total additional to the standard historical running total in
aregister
.See https://groups.google.com/d/msgid/hledger/0F2587EB-DF9A-4CE7-9A95-3C13B8042589%40joyful.com .
The text was updated successfully, but these errors were encountered: