Change to the Advanced Portfolio report

Mike Alexander mta at umich.edu
Mon Jan 19 19:00:38 EST 2015


I made another change to the Advanced Portfolio report which may 
simplify the recording of dividend and interest payments.  With this 
change you may not need to include the dummy split in the transaction 
as described in 
<http://gnucash.org/viewdoc.phtml?rev=2.6&lang=C&doc=help>.

This change causes the report to find income (and expense) transactions 
that are in the parent account of the security account being reported 
on.  This is done by looking in the parent account for transactions 
that have exactly two splits (not counting trading account splits) 
where the other split is to an income or expense account with the same 
name as the security's account.

For example given an account structure like

  Assets (type ASSET)
    Broker (type ASSET)
      Widget Stock (type STOCK)
  Income (type INCOME)
    Dividends (type INCOME)
      Widget Stock (type INCOME)

If you are producing a report on "Assets:Broker:Widget Stock" a 
transaction that debits the Assets:Broker account and credits the 
"Income:Dividends:Widget Stock" account will count as income in the 
report even though it doesn't have a split in the account being 
reported on.

This only works if the parent account ("Assets:Broker" in this case) is 
a Bank or Asset account and the Income/Expense account has the same 
name as the security account.  It won't double count transactions that 
have the dummy split since they won't be two split transactions.

Let me know what you think about this, particularly if it causes 
problems.  This version should be in the next 2.6.x release.  The new 
version of the report is also at 
<https://github.com/Gnucash/gnucash/blob/master/src/report/standard-reports/advanced-portfolio.scm>. 
The "Raw" button near the top of the page will get you a copy you can 
use to replace the one installed.

          Mike
 


More information about the gnucash-user mailing list