Every dividend transaction contains two transaction entries, one of
which is just the transfer to the cash account. When calculating the
realized gains, this cash transfer has to be ignored.
Previously, the realized gains from dividends were always zero
because the two transactions canceled each other out.
I'm not sure that I identified the problem completely. This fixes the
problem for dividends, but it my be necessary to fix this in similar
situations, too.
Every dividend transaction contains two transaction entries, one of which is just the transfer to the cash account. When calculating the realized gains, this cash transfer has to be ignored.
Previously, the realized gains from dividends were always zero because the two transactions canceled each other out.
I'm not sure that I identified the problem completely. This fixes the problem for dividends, but it my be necessary to fix this in similar situations, too.