Skip to content
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

Group Payees #59

Open
ms1monelli opened this issue Jan 7, 2018 · 3 comments
Open

Group Payees #59

ms1monelli opened this issue Jan 7, 2018 · 3 comments

Comments

@ms1monelli
Copy link

ms1monelli commented Jan 7, 2018

Is there a method to programmatically group payees?
Or even so much as to delete a payee?
be_payees.remove() does not seem to work

@rienafairefr
Copy link
Owner

Are you syncing-pushing the changes ?

client.be_payees.remove(element)
client.push()

@ms1monelli
Copy link
Author

Turns out the issue was payee I was trying to remove still had transactions associated with it.
Remove a payee with out any related transactions works as expected.

Any insight on grouping payees? Have tried to follow the logic via fiddler but coming up short.

Thanks

@rienafairefr
Copy link
Owner

rienafairefr commented Jan 9, 2018

Do you mean Combine Payees accessible in the "Manage Payees" in the web app ?

If that's the case, if I understand how that feature works, the idea would be:

  • Create a new payee

new_payee = Payee(name=***)
client.be_payees.append(new_payee)

  • Find all transactions with the payees you want

for transaction in client.be_transactions:
if condition(transaction.entities_payee):
transaction.entities_payee = new_payee

  • Push

client.push()

Not tested though :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants