gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Mon Oct 29 16:00:22 EDT 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/105ea8e9 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/cef574af (commit)
	 via  https://github.com/Gnucash/gnucash/commit/af5fb0dd (commit)
	 via  https://github.com/Gnucash/gnucash/commit/de343aac (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d8b8c197 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9a179f82 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4091ea8e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d318fff9 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/952ac9c7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f27ea2d4 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6c59cd15 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c13f076a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1444a58c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c94db1ac (commit)
	from  https://github.com/Gnucash/gnucash/commit/f6fb1101 (commit)



commit 105ea8e952dce9ef38ff75deca3d0d2e6839e3da
Merge: f6fb110 cef574a
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Oct 29 12:15:41 2018 -0700

    Merge Chris Lam's 'maint-category-barchart' into maint.

commit cef574affeb753e3faab2604a0cbd79a58bddb21
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 19 18:35:30 2018 +0800

    [category-barchart] remove old expensive function

commit af5fb0dde5b53e541fc181f2d237220b34fc2902
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun Oct 28 15:17:28 2018 +0800

    [category-barchart] remove datelist->stringlist

commit de343aac3d15d0cb483f1f0e6a527f8d96d49974
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 19 18:35:10 2018 +0800

    [category-barchart] optimize (account->balance-list)
    
    1. Modify dates-list definition
      instead of either (list date0 date1 date) or
      (list (list start0 end0 '())
            (list start1 end1 '()) ...)
      it now is a list-of-dates (list date0 date1 date2)
    
    2. Pre-generate account-balances using dates-list.
       account-balances-alist is an alist-of-balances
    
    3. Use the pre-generated account-balance-alist instead of
       calling (get-balance) to obtain balances. This
       bypasses (get-balance) which calls a very expensive query-based
       functions for every *account* and *date-interval*

commit d8b8c197bcfd76dd9ad0a623c6e4c75730127b7e
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 19 18:32:31 2018 +0800

    [category-barchart] use (or-map) in (not-all-zeros)

commit 9a179f8293fda7c94102213a491ff5c019d15eb5
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 19 18:31:30 2018 +0800

    [category-barchart] remove monetary->double
    
    doubles are not necessary for charts.

commit 4091ea8ea9bfe0ec897b05c7e0666655a13d6ff1
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 19 18:30:13 2018 +0800

    [category-barchart] rewrite monetary+ using commodity collector
    
    This is neater. Split into 2 functions, both of which are useful
    
    (monetaries-add . monetaries)
    add different gnc-monetary objects into a gnc-commodity-collector
    
    (monetaries+ . monetaries)
    special case for above whereby all monetaries are expected to be in
    one currency only -- convert gnc-commodity-collector to monetary

commit d318fff9a5fa7a26259eb6c4d5a107df55adcaf9
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 19 18:29:16 2018 +0800

    [category-barchart] remove old gnc-numeric methods

commit 952ac9c7f40ce209ce3b9976d7edbbc9ba1bdfbe
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 19 18:27:19 2018 +0800

    [category-barchart] compact functions

commit f27ea2d4bc57ad559ae9521094db39e0ca7ae1d9
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 19 18:23:42 2018 +0800

    [category-barchart] *reindent/untabify/delete-trailing-whitespace*

commit 6c59cd15cdafc490892349127a5af871436f91ec
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Wed Oct 17 17:52:18 2018 +0800

    [category-barchart] Deoptimize category-barchart
    
    This aims to partially undo commit 8aed5c3f660, and removes dependency
    unto collectors and report-collectors.

commit c13f076a331928d583892fd55397623038cbbe42
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Thu Oct 18 14:19:07 2018 +0800

    [report-utilities] modify gnc-account-get-balances-at-dates
    
    instead of returning a list of numbers e.g. (list 200 400 600), return
    a list of gnc-monetary objects (list $200 $400 $600) to be more
    meaningful.

commit 1444a58c0ea0bfc55081dd2d242cdd75a7c883af
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Wed Oct 17 22:25:53 2018 +0800

    [report-utilities] upgrade (gnc:account-get-balances-at-dates)
    
    (gnc:account-get-balances-at-dates) is upgraded to
    report-utilities. this function is slightly different to its
    single-account counterpart because it does not retrieve subaccount
    amounts.

commit c94db1ac340c69832192d05813e565b4f68db41a
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Thu Oct 18 14:10:36 2018 +0800

    [report-utilities] deprecate flawed function.
    
    I think this (gnc:account-get-balance-at-date) is flawed in sub-acct handling.
    Consider account structure:
    Assets [USD] - bal=$0
       Bank [USD] - bal=$100
       Broker [USD] - bal=$200
          Cash [USD] - bal=$800
          Funds [FUND] - bal=3 FUND @ $1000 each = $3000
    - Calling (gnc:account-get-balance-at-date BANK TODAY #f) returns 100
    - Calling (gnc:account-get-balance-at-date BROKER TODAY #f) returns 200
    - Calling (gnc:account-get-balance-at-date BROKER TODAY #t) returns 1000
      this is because although it counts all subaccounts bal $200 + $800 + 3FUND,
      it retrieves the parent account commodity USD $1000 only.
    It needs to be deprecated.



Summary of changes:
 gnucash/report/report-system/report-system.scm     |   1 +
 gnucash/report/report-system/report-utilities.scm  |  74 ++
 .../report/standard-reports/category-barchart.scm  | 909 ++++++++++-----------
 gnucash/report/standard-reports/net-charts.scm     |  76 +-
 4 files changed, 535 insertions(+), 525 deletions(-)



More information about the gnucash-patches mailing list