gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Wed Feb 20 06:15:40 EST 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/e3160af4 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/60558f6a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b1cd7393 (commit)
	from  https://github.com/Gnucash/gnucash/commit/11083d60 (commit)



commit e3160af417b1ab8ca52bda9be7a02304cb5708cc
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Feb 8 14:25:50 2019 +0800

    [report-utilities] fix (gnc:make-stats-collector)
    
    allows it to compare numbers with +/-inf.0 -- 10E9 is an arbitrary
    number to compare numbers.
    
    (< N +inf.0) is guaranteed to be #t for all numbers N whereby N is not
    also +inf.0.

commit 60558f6ad185a66c1da67f0fd0123c4b26d3381f
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Wed Feb 6 21:41:20 2019 +0800

    [report-utilities] (gnc:account-get-balances-at-dates) documentation
    
    the algorithm assumes dates-list is sorted chronologically. enforce
    it, and document.

commit b1cd7393b6908a99268c085db01f3bb543634bd5
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon Jan 7 23:56:13 2019 +0800

    [report-utilities] gnc:account-get-balances-at-dates adjustment
    
    (Release Note - developer section)
    
    Modification to gnc:account-get-balances-at-dates.
    
    formerly it would accept an optional #:ignore-closing? boolean to skip
    closing transactions.
    
    it would be more general to accept a #:split->amount function whose
    default is xaccSplitGetAmount. calling (split->amount split) should
    return amount from the split. if the function returns #f, it
    effectively skips the split. this will allow a more general
    account-balance list accumulator, allowing novel balance strategies
    e.g. split->amount may test split void status and return the split
    xaccSplitVoidFormerAmount, test description/memo and return an amount
    depending on description contents, or test the split and return 1 or 0
    which will return a tally of splits.
    
    the direct equivalence for the previous #:ignore-closing? keyword
    argument is #:split->amount (lambda (s) (and (not (xaccTransGetIsClosingTxn
    (xaccSplitGetParent s))) (xaccSplitGetAmount s)))
    
    NOTE: the modifications to category-barchart.scm and net-charts.scm
    will use the #:split->amount kwarg as well.
    
    This function is extensively tested in the commit
    53cab269f467cf73ff7e20cde797cd08212b9435



Summary of changes:
 gnucash/report/report-system/report-utilities.scm  | 83 +++++++++++-----------
 .../report-system/test/test-report-utilities.scm   | 48 +++++++++++++
 .../report/standard-reports/category-barchart.scm  | 18 +++--
 gnucash/report/standard-reports/net-charts.scm     | 14 ++--
 4 files changed, 111 insertions(+), 52 deletions(-)



More information about the gnucash-patches mailing list