-
Notifications
You must be signed in to change notification settings - Fork 11
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
Assigning transactions as transfers between two accounts #106
Comments
Hello, Each transfer is an individual payee, and this payee can be taken using the function account = get_account(session, "My Account")
transfer_payee_id = accout.payee.id Or you can get a list of them: transfer_payees = [payee for payee in get_payees(actual.session) if payee.account] Problem is, my actions currently do not support this transfers, because a transfer is not just setting the payee, but you need to create a corresponding transaction on the other account. I believe I can implement it at some point, but not as of now, as it is a bit more complicated than it seems, as:
I'm not sure how actual handles all edge cases, and would have to check that to create an implementation. Do you want to run a "transfer rule" on your entire budget transactions? |
Ok, so I went through the source code from Actual to figure out how this is handled by them. First of all, the transfers are processed under It will then go through the transfer rules and update the transaction based on that: Currently, the user can assign any payee id on current actualpy, and it would not create the second transaction, causing the balances to be off. I would say that we do the following:
This is not a simple bug fix but I'll tackle this at some point. |
Thanks for looking over this! I found another reference in case it's useful for you. This SQL command doesn't create rules, but it works well to identify and apply transfers to historical transactions retroactively. Even though currently on actualpy I cannot set a Transfer Payee on a Rule, there's workaround by going to the UI and selecting payee accounts manually at the Rules page. |
I actually played around with it a bit, and push #110 together, do you mind giving it a try? As far as I tried it could not corrupt one of my demo budgets, but you never know, have a backup. The worst that can happen was having unbalanced transactions. It still cannot resolve the payee fully, as I does not look for a probable transaction on the other side. I'd have to implement this next. |
Description
I was able to create rules, but I'm not sure how to assign transactions as transfers between two accounts. Can you provide guidance on how to do this?
I tried to set
Action(field="description", value=account_id)
, but it would show the payee as(deleted)
and thus cannot be applied to matching transaction. Would it be possible to setAction(field="payee", value=account_id)
?Reference: Make a transfer from two existing transactions
The text was updated successfully, but these errors were encountered: