gnucash maint: Multiple changes pushed

John Ralls jralls at
Fri Dec 9 13:52:27 EST 2016

Updated	 via (commit)
	 via (commit)
	 via (commit)
	 via (commit)
	 via (commit)
	 via (commit)
	from (commit)

commit 7b7c780a3615e8877af4ff5a90bb5db513701ce9
Merge: 57e7ba8 332bd3b
Author: John Ralls <jralls at>
Date:   Fri Dec 9 10:34:02 2016 -0800

    Bug 775368 - "Average cost" price source problem
    This series of changes modifies the Average Cost report function to
    finding the average amount-weighted price of all transactions recording
    a "buy" of the report commodity so that the correct amount is now
    reported without the need of a capital gains split--though one is still
    needed to get the Trial Balance report to balance.
    Since book-wide averages are not what most users expect, it also changes
    the default pricing option on all reports to "Nearest in Time", which is
    what most confused users have selected after asking about it in the
    mailing lists. This also fixes
    Bug 340991 - Default price source for reports not good.

commit 332bd3bb3efeb4c09ca686aa445df554dc656092
Author: John Ralls <jralls at>
Date:   Fri Dec 9 10:33:28 2016 -0800

    Change the default price-source from Average Cost to Nearest in Time.
    Average cost is a counter-intuitive calculation for most users; Nearest in
    Time is generally reported to produce the results that users expect.

commit 98697a1e23c48737e472eba6314c3d05e6e689ee
Author: John Ralls <jralls at>
Date:   Fri Dec 9 10:22:06 2016 -0800

    Calculate rates only for buy transactions in the report commodity for cost totals.
    Reverse the direction of splits with negative amounts as they represent a
    sale of the transaction commodity. Accumulate buys and sells of commodities
    into separate comm-lists and use only the buy-side ones for the report-commodity
    in the calculation.

commit d9dbc3de04eb9518a688a9846e5276c3d2a2d05c
Author: John Ralls <jralls at>
Date:   Sun Dec 4 15:00:51 2016 -0800

    Single functions for gnc:make-exchange-alist and gnc:get-exchange-totals.
    Extract helper functions and add a parameter, eliminating gnc:make-exchange-cost-alist
    and gnc:get-exchange-cost-totals.
    This makes it more clear the differences between the two algorithms and
    makes it easier to correct the algorithm for the cost case.

commit 0829d6dc0301a40c1c12406aee75ad89275764f3
Author: John Ralls <jralls at>
Date:   Thu Dec 1 16:32:41 2016 -0800

    Move checks for no split amount and trading accounts to get-match-commodity-splits.
    They apply to all price retrievals.

commit 5803c141c18a6ff75a7f49a9142f834a596857f5
Author: John Ralls <jralls at>
Date:   Thu Dec 1 15:42:27 2016 -0800

    Clean up whitespace in commodity-utilities.scm.

Summary of changes:
 src/report/report-system/commodity-utilities.scm   | 1305 ++++++++++----------
 src/report/standard-reports/account-piecharts.scm  |    2 +-
 src/report/standard-reports/account-summary.scm    |    2 +-
 src/report/standard-reports/balance-sheet.scm      |    2 +-
 .../standard-reports/budget-balance-sheet.scm      |    2 +-
 .../standard-reports/budget-income-statement.scm   |    2 +-
 src/report/standard-reports/budget.scm             |    2 +-
 src/report/standard-reports/equity-statement.scm   |    2 +-
 src/report/standard-reports/income-statement.scm   |    2 +-
 src/report/standard-reports/sx-summary.scm         |    2 +-
 src/report/standard-reports/trial-balance.scm      |    2 +-
 11 files changed, 631 insertions(+), 694 deletions(-)

More information about the gnucash-patches mailing list