GNOME Bugzilla – Bug 314554
Advanced-Portfolio different currencies
Last modified: 2018-06-29 20:53:38 UTC
Please describe the problem: There is a problem if the report lists stock of different currencies. E.g. if there is a fund in $ and the general currency is Euro the report reports everything in Euro, which is fine. The value column contains the right value (i.e. the value of the $ fund in Euro ). However, the money in (and probably mone out, too) show the amount in Euro, which actually was in $ (obviously, since the stock-account is a $ account). Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information: I assume that there just has to be added a currency exchange computation. Which probably (by default, at least) should be use the currency value of the time nearest to the date of the transaction. I also looked at the advanced-portfolio.scm file, unfortunately I am not into that language at all, so I wasn't able to understand to much of what is going on there :-). But I assume that it can be easily fixed, I hope...
Other bugs concerning the Advanced Portfolio report are bug#105466, bug#115267 (maybe both are duplicates of this one), bug#311549, bug#312049 , bug#326150
Created attachment 58901 [details] [review] Handle multiple currencies better in several reports This patch helps the problem described in this bug, as well as several other problems with reports containing multiple currencies. It is a bit of a kitchen sink patch (for which I apologize) but the changes are mostly related to currencies and prices in reports. The patch adds a currency option to the two portfolio reports and the transaction report and converts things to that currency. If you specify use of the nearest price, it picks the price nearest to the transaction, not nearest to the date of the report. It also uses noon on the day of the transaction to find the nearest price instead of midnight the night before (making it more likely it will get a price on the same day instead of the previous day).
Okay, I've applied this to SVN, r13244. Thanks! Note that it didn't quite apply cleanly because of some other patches I've applied, so you might want to: a) check my work, and b) make sure your checkout doesn't have merge conflicts. I also found some paren imbalances in advanced-portfolio.. I /think/ I fixed it properly, but I don't have a test data file with stocks so I can't actually test the change. Thanks!
Actually, the advanced-portfolio patch is broken, so I'm reverting it in SVN. Any chance you could re-form the patch against current SVN? Right now it just doesn't work at all.. it has mismatched parens.. and it seems to have lost some functionality (e.g. the include-empty flag doesn't do anything anymore).
I have ground my way through the parens and fixed this patch and provided unified diffs along with my display options patch over at http://bugzilla.gnome.org/show_bug.cgi?id=330577 and this should fix this situation. Note that I don't work in multiple currencies, so whether Mike's patch, as fixed by me actually does what it's supposed to, I don't know. However, it does now run. ;) patch attached to other bug... sorry to make people jump links, but hey... A
Commited Andrew's patch to SVN r13264.
OKay, I'm revisiting this thing as it seems to me, upon reading, to not be a bug at all. please help me figure this out. more below > Please describe the problem: > There is a problem if the report lists stock of different currencies. > E.g. if there is a fund in $ and the general currency is Euro the report reports > everything in Euro, which is fine. okay, you've got mixed currencies in account and have set the display to show everything in Euro's, right? > The value column contains the right value (i.e. the value of the $ fund in Euro > ). okay, so its converted the value of the fund into Euros and shown it. good. > However, the money in (and probably mone out, too) show the amount in Euro, > which actually was in $ (obviously, since the stock-account is a $ account). > the report has been set to show Euro's, so why show a $ amount? If you have a moneyin column that has both euros and $ in it, then your totals are meaningless. How do you decide which currency to diplay your totals in? DO you want to see the individual line item in one currency but the totals in another? IOW, I don't think, based on your description, that this is a bug. so please enlighten me :). A
thre are continued issues with this report. most I think are fixed in: http://bugzilla.gnome.org/show_bug.cgi?id=334338 I don;'t think there is any need to reopen, just putting this in the record. A
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=314554. Please update any external references or bookmarks.