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

Add multiple postings to imported transaction #199

Open
addisonklinke opened this issue May 26, 2023 · 5 comments
Open

Add multiple postings to imported transaction #199

addisonklinke opened this issue May 26, 2023 · 5 comments

Comments

@addisonklinke
Copy link

I'm using several generic_importer_source data sources which parse CSV data using a basic beancount importer. As expected, each transaction shows up with two postings - one for the source account and another FIXME. The UI lets me enter the appropriate FIXME account which is great. However, there doesn't seem to be support for adding multiple postings. For instance, if my importer provides

2023-05-26 * "Xcel Energy" "Monthly utilities"
  Assets:Checking:Chase                                      -150 USD
  Expenses:FIXME                                              150 USD

I want the UI to let me write the following to my output beancount file

2023-05-26 * "Xcel Energy" "Monthly utilities"
  Assets:Checking:Chase                                      -150 USD
  Expenses:Utilities:NaturalGas                                60 USD
  Expenses:Utilities:Electric                                  90 USD

This would be very useful for dividing an expense across multiple accounts

@Zburatorul
Copy link
Collaborator

Have your importer generate multiple postings, for FIXME:A, FIXME:B etc.

@addisonklinke
Copy link
Author

That's a decent workaround, but it's not always possible to know the number of postings ahead of time.

For example, if my company sends travel reimbursements to my checking account in a lump sum but it should get booked to multiple expense accounts (restaurants, lodging, transportation, etc). I can't know in advance which accounts will be involved. Also, the signature of the transaction (in a downloaded CSV) might look identical to my regular paycheck (which doesn't contain any reimbursements), so the importer wouldn't have any distinguishing factors (other than amount which isn't reliable month-to-month) to determine if the placeholder reimbursement postings should be added.

Things would be a lot easier if the UI had a "add/remove posting" button or similar to dynamically alter the transaction. Is there a reason this feature couldn't be on the roadmap?

@Zburatorul Zburatorul reopened this May 26, 2023
@jbms
Copy link
Owner

jbms commented Jun 1, 2023

Another way this can be accomplished currently is to use "Shift+Enter" to accept a candidate but immediately focus it in the editor view for editing. Then you can edit the postings as you like. It seems that if we supported editing postings in the candidate view it would ultimately require full text editing which would be difficult to integrate, and it isn't clear that it would be better than the existing solution.

Another thing to consider: you could in separate transactions add each reimbursable expense to an Assets:Receivable:Company-Name account. Then for your paycheck transaction you would just need one other account.

@addisonklinke
Copy link
Author

I'll try switching to the editor window, that seems like a reasonable workflow especially with the keyboard shortcut. Thanks!

@addisonklinke
Copy link
Author

@jbms The shift + enter option has been working for me, except after I save the journal I can't get back to the list of pending candidates I had previously without restarting the server. Is this expected?

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

3 participants