-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Bug]: Scheduled transaction preview with splits shows split error #3353
Comments
For visibility - @jfdoming |
Yes thanks for triaging! I took a look yesterday and was struggling to root cause. But I'll keep at it |
If it helps with root cause, I can confirm that this also happens under the following scenarios:
All running current 24.9.0 build. |
@jfdoming I took a look at it and considered attempting a PR but don't feel familiar enough with the code to know I wont break things. As a kludge it seems like you can just add I believe the root cause lies in this block of code in the rules.ts
In this block the amounts of the split subtransactions don't appear to be populated until after I'm not very familiar with the code, but it seems wasteful to recalculateSplit on every iteration of the loop. I would think it could just be recalculated at the end after all of the subtransactions have been added. |
@sjones512 Yeah sorry I dropped the ball on this one. I want to do a larger refactor to avoid these problems and add some unit tests. Are you okay to wait for that? I will get to it soon but work is killing me right now 😞 |
Totally your call. It is a fairly intrusive UI bug when it happens, but I think it can be worked around by setting the last split rule as "a portion of the remainder" instead of "fixed-amount". I'm not familiar with Actual's release process. If you think you'll be able to include the refactor in the next release, there is no reason to merge this. If not, this could be a band-aid to resolve the immediate issue, and a separate issue could be raised for the refactor. Either way, good luck with work! 💪 |
Thanks! I'll try to get to it this weekend. Releases are cut around the 20th IIRC, and I'm a maintainer so I can force merge it 😈 jk, but I'll make sure it's the next release in some form. |
Verified issue does not already exist?
What happened?
Steps to reproduce:
Create a schedule with some splits
Set the schedule so that it shows up as Upcoming
The split error is shown even though the amounts are balanced
Where are you hosting Actual?
Fly.io
What browsers are you seeing the problem on?
Chrome, Other
Operating System
Windows 11
The text was updated successfully, but these errors were encountered: