Previously the splits handling used nested conditionals. Rearrange and
tidy; i.e. handle empty-splits or empty-interval-splits first, and use
last conditional to test for internal-transactions handling. This
avoids nested conditionals.
If the original date is an end-of-month date, we take it as an
indicator they always want monthdelta dates to be end-of-months.
This works for monthly/quarterly/halfyearly/annual.
Addendum to commit 65bfeaf5de which was
deemed to be an incomplete fix.
Also I'd forgotten to activate a test in test-date-utilities. Enable it.
previous setting would set document-title which adds an <h1> element
and prevents the chart from fitting into the canvas viewport set 100%
width x height.
This commit removes the need for analyze-splits, and counts all
split-amounts directly into the daily-totals list.
Because we're not using analyze-splits, there's no need for startbal
anymore.
The gnc:case-exchange-fn seems to be designed for single-date reports,
whereas gnc:case-exchange-time-fn for multi-date reports. It may be
faster to have a single exchange-fn definition.
The main reason for this change is to harmonize - all multidate charts
are using case-exchange-time-fn.
previous will call gnc:account-get-comm-balance-at-date which calls
xaccAccountGetBalanceAsOfDate for every account at every date
point. The xaccAccountGetBalanceAsOfDate is an expensive function
because it scans the account's whole splitlist from the start every
time. use gnc:account-get-balances-at-dates instead which scans an
account only once to generate a balancelist.
this should be a much faster chart.
this commit will initialize the sx accumulator by adding all
instantiated sx amounts, from the earliest split posted-date among the
selected accounts, until the report start-date.
* Draw the "balance" line over the "minimum" line.
* X axis labels should be for the end of the period,
as that's when all the balance samples are taken.
This report forecasts the combined balances of the selected accounts
based on the scheduled transactions and plots them on a line graph.
You can set a "reserve" amount, which will draw a red line on the
graph, so you can easily see if your forecast dips below a given value.
There is also a "future minimum" line which shows what the lowest future
balance will be at a given point. I find this useful in conjunction with
the "target" line for planning.
this function made clearer. first we can remove sanity-check:
pricealist will always be sent as a list, and doesn't need to be
confirmed it is a pair? because assoc-ref can handle an empty list
returning #f.
then the conversion routine is reordered to be clearer.
This function is only used once, internally, and performs a sanity
check (if price-value ... ...) which is, never needed because the
price-value received has been sanitized to return a price, or 0 and
will never be #f. Inlining this function means we can skip this sanity
check.
The commit 4ee0c3ef4 was incomplete and was missing GNC-OWNER-JOB
which would return #unspecified to string-append causing error. This
commit restores this conditional and also a fallback "" to return to
string-append.
this debugging tool was flawed and was not able to strify the value
collector. we have to forego the procedure->str strify function
because scheme isn't typed and procedures would be called by the
value-collector section.
This function is "called" by gnc:case-exchange-function when the
latter is called with parameter 'actual-transactions but the later is
never used.
To boot it was called with 3 arguments but expects 5. I "fixed" this.
It can be deprecated.