gnucash maint: [balsheet-pnl] pnl columns should retrieve appropriate price.
Christopher Lam
clam at code.gnucash.org
Mon Feb 15 07:59:45 EST 2021
Updated via https://github.com/Gnucash/gnucash/commit/b4e99a30 (commit)
from https://github.com/Gnucash/gnucash/commit/6efdafb9 (commit)
commit b4e99a30484e105724b7979ec5de3e802d47d81d
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Feb 15 19:10:17 2021 +0800
[balsheet-pnl] pnl columns should retrieve appropriate price.
Preamble: the profit&loss list of dates starts from starting_date,
adds Delta time until end_date. i.e. monthly pnl from 1-jan to 31-dec
generates list 1-jan 1-feb 1-mar etc.
The pnl columns refer to period ColumnDate to next ColumnDate, less 1
day. i.e. 1-jan to 31-jan, 1-feb to 28-feb, 1-mar to 31-mar etc.
The pnl columns must convert to report-currency using price retrieved
on the period end_date rather than the next start_date. i.e. Old code
would retrieve 1-feb price for 1-jan to 31-jan column. This is
incorrect. This commit ensures that the 1-jan to 31-jan retrieves
price on 31-jan.
Summary of changes:
gnucash/report/reports/standard/balsheet-pnl.scm | 25 +++++++++++++++-------
.../reports/standard/test/test-balsheet-pnl.scm | 16 +++++++-------
2 files changed, 25 insertions(+), 16 deletions(-)
More information about the gnucash-patches
mailing list