Advanced Portfolio: Add some more debugging output.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23711 57a11ea4-9604-0410-9ed3-97b8803252fd
Advanced Portfolio: Eliminate all overflow problems.

Share and price calculations are done to 5 decimal places and currency
calculations are done using the precision defined for the currency.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23712 57a11ea4-9604-0410-9ed3-97b8803252fd
Advanced Portfolio: Fix a bug in the code that detects a spin-off.

It was using an unset variable that was always zero.
Also do a better job of finding a pricing transaction and a couple of other
minor changes.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23713 57a11ea4-9604-0410-9ed3-97b8803252fd
Advanced Portfolio: Use the more common LIFO name for the basis method.

Don't change the internal code to avoid invalidating saved reports.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23714 57a11ea4-9604-0410-9ed3-97b8803252fd
Advanced Portfolio: Fix the basis calculations.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23715 57a11ea4-9604-0410-9ed3-97b8803252fd
Advanced Portfolio: Fix realized gain calculation and handling of brockerage fees.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23716 57a11ea4-9604-0410-9ed3-97b8803252fd
Advanced Portfolio: Try harder to find a price and use the one it claims to be using.

Sometimes it would display one price but use another one to compute the value.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23717 57a11ea4-9604-0410-9ed3-97b8803252fd
Advanced Portfolio: Remove the "latest before" price source.
It's not implemented and could easily be added back if it ever is implemented.
This will break any saved report using this price source, but they are
broken already.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23718 57a11ea4-9604-0410-9ed3-97b8803252fd