New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transfers with different currencies are incorrectly updated during database update #724
Comments
I'm looking into it! |
I'm sorry, I can't replicate this. I've created a EUR and a USD asset account in a fresh 4.6.1 installation, and I transfer some money between them. I then insert the database into a 4.6.3.1 installation and tell it to upgrade. The only change is that the Otherwise, everything else seems to be the same. |
OK, I don't have many transfers between different currencies so let's hope future updates will not change the amounts. |
Well, the issue popped again when I wanted to upgrade from 4.6.3.1 to 4.6.4. Hopefully I did this on the copy of the production database. Will be glad to help you debug the issue further. Any SQL-s that I can make on prod and backup databases for comparison? |
Damn :(. I really hoped this was fixed. What I would like you to run is the following:
That should give me enough information to fix the upgrade-routine. Please censor the data as you like and send me the results by mail |
Mails sent and just a reminder - I use PostgreSQL. |
I don't understand why the firefly:upgrade routine doesn't give your accounts a preferred currency_id. |
The upgrade sets preferred currency id for some accounts according to the messages. |
I've created a fresh 4.6.1 installation just now and I'm doing some extended debugging. I'm going to upgrade from 4.6.1 to 4.6.3.1 to 4.6.4 (dev version). Of course on Postgres, and with as many foreign transactions as I can think of ^^ |
I'm currently back at 4.6.0 but it all seems to work fine. Could you edit your asset accounts, verify their currency preference and save them? The table |
Hi, I double checked all asset accounts and each have correct currency set and also corresponding entry in
Why are you setting foregin_amount of the destination transaction with the amount of the destination transaction? Shouldn't this line looks like this:
|
OK cool, then it's the 1:1 ratio I can focus on. I know that the current routine also uses a 1:1 conversion which isn't too bad per se. It should however:
|
I think I fixed this, I tried many variations and FF comes out on top all the time. However, sometimes there is no choice but to do 1:1 conversion. I will release the latest FF3 this weekend and I hope this will finally be solved. Make sure you log on the DEBUG level and keep an eye on the log files. |
New release is live, closed. |
No errors during upgrade. All transactions have correct currency ratio. Thank you for debugging this! |
Glad to hear it. No problem! 👍 |
Hi,
I've upgraded from 4.6.1 to 4.6.3.1 today. During the upgrade procedure following info was displayed:
Transfer #284 has been updated to use the correct currencies. Please verify this in Firefly III.
I've checked the mentioned transfer and it was updated incorrectly! Before upgrade transfer looked like this (an example numbers):
Total amount | $500.00 (€400.00)
After the upgrade the same transfer was like this:
Total amount | $500.00 (€500.00)
It seems that during upgrade firefly decided to use 1:1 currency conversion rate. It seems like a bug.
Regards
The text was updated successfully, but these errors were encountered: