[GNC] Configurable Year Start Day/Month
flywire
flywire0 at gmail.com
Fri Apr 21 21:23:00 EDT 2023
John,
Seems like an X-Y response. The meaning of a hack is clear, although this
is more of a tweak, and where it occurs hardly matters if it's not part of
a PR. A response in terms of using existing report/module code in a new
report would be fine.
https://github.com/Gnucash/gnucash/blob/5.0/gnucash/report/reports/example/sample-report.scm#L64-L77
demonstrates creating a list of options, so it follows, changing it changes
the options. I'll take it consult the list is used to mean seek advice or
information, and understand some code in the repo is depreciated. None of
this is core to the question.
To elaborate:
1. I'm seeking guidance on the processes involved in setting and using
the date option, and how to change it. There seems to be more to the
changed approach in V5
https://github.com/Gnucash/gnucash/tree/5.0/libgnucash/engine than
covered in the documentation. Apologies in advance if terms are used
incorrectly.
2. I imagine there are two approaches:
1. Override the value of year in scheme so it starts 1 July in
the previous year. I understand the options and lists are defined in C++
but I'm only focused on scheme reports. Are these option values in scheme
mutable or can they easily be changed to mutable? Existing textual
descriptions of the options are fine. Can start/end year just be
registered
again in a scheme report with a new definition or redefined in
scheme using
the date-utilities.scm process in V4?
2. Redefine option values in C++. This is more problematic for me
because I haven't been able to compile GnuCash in Windows. Nevertheless,
every commit goes through a recompile as part of a CI process.
Would it be
feasible, and if so how, to use that process in a private fork and grab a
windows executable from it to use on my PC? I expect I could work my way
through the C++ code and change value definitions and lists.
3. I'd actually like to add a new date symbol for start/end of 2 years
prior period.
Your response previously linked from 2021 shows you have considered it.
Maybe you have a better approach in mind, possibly something this year. It
could be relevant.
Regards
More information about the gnucash-user
mailing list