-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Updating deposit/withdrawal with foreign currency not working #1236
Comments
I am just starting to learn Laravel, but I sense something in TransactionUpdateService.php $data['amount'] and $data['foreign_amount'] is used but (if these are the form values) the update form is using 'native_amount' and 'amount' where 'amount' stands for the foreign value. |
var_dump for the $data array says this: |
Thanks for reporting this, and thanks for the extended bug report! It seems the problem was in Javascript, and not in PHP. You can see in the commit that the currency for the asset account was set to HUF instead of EUR (in your example). That makes Firefly III think that HUF is the normal amount. This fix is live on the demo site where you should be able to edit a transaction with foreign amount data without any problems. Let me know if this has fixed it! |
Yes, fixed. Another notice: As you know, bills only work with the default currency. In my case it is HUF. I have a EUR account for my payments and company related expenses.
BUT
I think it is rather a bug, but I could use it as a feature, converting all my EUR expenses to HUF and solving a lot of problem with that. Thanks! |
If you swap out transactions I cannot guarantee things will work. I can see what you're doing but I can only do one thing, not both:
You can use HUF transactions on a EUR account as main currency. It is not difficult to do this. But the charts will deviate (main balance of the account will be incorrect) and other sums could break as well. I'm not sure what the bug is, but several features relate to this: #1207 #1071 #991 #869 |
Aha, now I get what you mean. Thanks! The box for balance is not multi-currency, and that is confusing indeed. I can see that it updates as it should, but it adds 1000 EUR to your HUF balance. I have updated the development version to fix this. There is only room for two currencies, but that should be enough. For your withdrawal, I also see a change in balance that is wrong. This will also be fixed. |
I am running Firefly III version 4.7.1.4
Description of my issue:
Updating a deposit/withdrawal which was created with foreign currency is not working properly. After update, the foreign currency and amount disappears.
Steps to reproduce
Reproducing on demo site:
Adding a withdrawal with a EUR account, but changing currency to HUF. It shows the HUF as main, and EUR under it. Set amounts and submit.
You will see a transfer with ammount xxx EUR ( yyy HUF)
Go to the edit page of this transaction:
You will see HUF still at main, and EUR under it. Edit something for eg. add a tag. Update.
Now you will only see the transaction with only yyy HUF ammount (and no EUR)
Go to the edit page again:
Now you only see the main HUF value and no EUR.
After this, there is no scenario to set the EUR master value back.
I think with the update, you are overwriting the native currency with the foreign one.
(please include if this problem also exists on the demo site)
Other important details (log files, system info):
Please click the version number in the right corner of any Firefly III page to get debug information.
The text was updated successfully, but these errors were encountered: