-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow filtering transactions by payee #1
base: master
Are you sure you want to change the base?
Allow filtering transactions by payee #1
Conversation
This looks reasonable, although I concur on the syntax. Maybe there's a better way to do this - two spaces or a tab is used to separate account from amount, so we know that's a case that can't be in the account name - if we went that way could extend it even further as need arises, such as: One note - the way you're structuring your Ledger files may make it harder in the long run to sort out sub-account totals. For example, in the structure I use, I put the name of the customer as a part of the account, so I can do this using the built in regex support:
which gets the sum of Also, when sending pull requests, it's best to squash all the changes into one commit. |
Good point, that sounds much better.
That is another valid option, but the reason I have avoided that so far is I prefer not to duplicate information unnecessarily, and I already have the name of the company as the payee, so I'd rather not also have it as a sub-account.
No problem, I wasn't sure what the policy was for this repo. When I have time later I'll make that syntax change and squash everything down to one commit. |
Per discussion in zdw#1, use two spaces to split account name from payee, since Ledger accounts may not contain more than one space in a row.
e05bf0c
to
d2ad161
Compare
@zdw I've updated my PR. |
This updated PR looks good. I don't have a license assigned to this repo, and I should add one before I start accepting contributions. Would the Apache-2.0 (preferred), or the BSD 3-clause (like ledger) be OK? |
I have no preference between those two licenses. Since this is a separate program, I don't think you are limited by what license Ledger uses, if that's what you're asking. |
I wanted to use this tool to calculate the values that would appear on my W2s, so I needed a way to filter by payee. I hacked together this solution that just splits the account name on
--
, so the following line in a command file:will assign to
$fw2_line01_gross_wages
the total ofIncome:Wages
for any transactions involving Acme Inc.I'm not happy with the syntax, but I couldn't think of anything better. Do you have any other ideas?