-
-
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
Asset account -> Opening balance does not keep the correct amount #972
Comments
I'm not able to replicate this on the demo site. Both before and after saving the amount remains 1000,-. Are you running Firefly III in Dutch? What happens when you enter the amount "123.45"? Does it still reverse the amount? Could you check the following? Open your favorite database editor and run this query:
Where the ID is the ID of your new asset account. Then, run the following query:
Where the transaction_journal_id is retrieved from the previous query. Could you share the amounts for the transactions? |
Yes I'm running in Dutch but the problem exists in english
the second query gives the same result so i did it on the transaction_journals with the following result:
|
Both of these queries were executed on the |
My bad
It's good to know that i'm running on a clean install with only the actions from before |
Mmm, both are negative, that shouldn't happen. Which OS are you running FF on? Is it running from a Docker image? Are you using Sandstorm.io? Which browser / operating system? |
I'm running it op an mac mini with ampps |
Using Safari, Chrome or FF? All I can do at this point is add debug info for the next release. I'm having a hard time replicating your issue (it all works just fine here) but I am seeing some conditions in the code that could cause trouble. It's just that I don't have said trouble. You could help me out by enabling debug mode. Then, open file That should add a lot more debug logging. If you could try it, I might be able to pinpoint the problem. |
I enabled the debug mode and replaced said file. |
Could you try to recreate the account? To fix the current account, change one of the two entries in your database (table transactions) to be positive (leave the other one negative). That should fix it for this account. With the extra logging I hope to find out what happens when you create a new account (and it goes badly). Thanks for the logs so far! |
I've compiled whole new project with composer and created the account and all with the debug logging enabled. |
Damn! That's all I can ask you for now. I will push 3.9.10 this weekend. It will contain some changes that I hope will fix this. Is that OK? In the mean time, to fix your current asset account, change either of the two entries in |
I also just tried it on another machine (MAMP PRO v4.2). no problem there. |
It could be yes, I will keep it in mind. As for the reverse proxy, try some of the tricks from this issue: #921 |
But I am glad the bug seems to be gone at least. The debug-logging I've added may help somebody else in the future. |
Closed, a new release is live. |
Sadly the problem still exists in version 4.6.12 Here's some info
running on a linux webserver with using browser Chrome (63.0.3239.84) Here's the debug log: |
Compare this with the creation of these transactions https://github.com/firefly-iii/firefly-iii/blob/master/app/Repositories/Account/AccountRepository.php#L389. I still have no idea what's causing this. Could you sure the |
Wait, looking further, i see the initial creation went through fine, the edit is broken. |
OK, that was surprisingly simple once I got to think about it. I've pushed a fix (see above) and I invite you to replace the entire content of the AccountRepository.php file with this. This will also fix accounts that are already broken. |
I am running Firefly III version 4.6.9
Description of my issue:
The opening balance does nog keep the value that I entered. Instead it looks like it places a negative of the number
Steps to reproduce
[name] = Rabo
[Opening balance] = 1000
[Account role] = Savings
[Opening balance date] = 21/09/2017
Save the info
NL39RABO0300065264 (this is an valid example)
Save the info
the value is now negative.
it is not possible to edit the value to a positive number
The text was updated successfully, but these errors were encountered: