Open emin63 opened 4 years ago
Yes, the payee matching and the offsetting account are related, because ledger-autosync
uses the matched payee (either the raw payee from your imported file, or the one found by finding a transaction with the matching AutosyncPayee
tag) to find the offsetting account. I'm not super happy with the latter part yet, but I think some of the issues you mentioned here are mainly a case of ledger-autosync
not knowing how your accounts are laid out, and can be fixed pretty easily.
That is I sold some stock in the account
My Traditional IRA
and that then gets an offsetting entry toAssets:Unknown
. The thing is the stock was sold fromMy Traditional IRA
and the cash went intoMy Traditional IRA
. I think I want a way to tell l-a that for some kinds of transactions or files both accounts should be the same.
That's fair, but I don't think it's something that ledger-autosync
could assume by default, because I could see someone having separate sub-accounts for cash vs. stock, e.g. My Traditional IRA:Cash
vs. My Traditional IRA:Stock
.
I think the easiest way to fix the example you mentioned would be to paste that transaction into your Ledgerfile, replace Assets:Unknown
with My Traditional IRA
, and run ledger-autosync
again. Assuming the payee is sufficiently unique, that should pick up the change for any future transactions.
I think you should be able to fix most of the problems you mention here by doing that, but I'm a little confused by your summary point 3. For dividends paid in cash, does ledger-autosync
output a transaction moving cash from Income:Dividends
to My Traditional IRA
? What would you rather have it do instead, and how does it mess up the register reports?
I have another question; this time it is about offsetting accounts.
Before I get to it, however, I want to say that I think l-a is awesome and so that's why I'm digging into it and finding these questions. Please let me know if I'm over-posting and I will slow down.
I'm having some trouble with the ofsetting accounts when downloading a bunch of transactions for my Vanguard account. I have various things like a dividend received or interest or a stock sale or something and I end up with the following result from l-a in my *.dat file:
That is I sold some stock in the account
My Traditional IRA
and that then gets an offsetting entry toAssets:Unknown
. The thing is the stock was sold fromMy Traditional IRA
and the cash went intoMy Traditional IRA
. I think I want a way to tell l-a that for some kinds of transactions or files both accounts should be the same.Arguably I'm just a noob with
ledger
and don't know what I'm doing. For example, usually the aboveSELL
is followed by a transaction namedMONEY FUND PURCHASE
where the $1230.00 of cash gets swept into my money market fundVMFXX
and offset againstAssets:Unknown
and so theAssets:Unknown
part cancels out.But there are a variety of cases where things don't cancel out and it gets confusing. For example, if a stock pays a cash dividend then l-a marks the offsetting account as
Income:Dividends
which seems cool at first. But then Vanguard sweeps the cash into VMFXX and offsets that withAssets:Unknown
which makes it look like I have an "extra"$69
in my account and a deficit of$69
inAssets:Unknown
. I can fix this by making the cash sweep into VMFXX come fromMy Traditional IRA
instead ofAssets:Unknown
and preserve the information that I am gettingIncome:Dividends
but it is kind of a hassle when there are a lot of transactions.Maybe if I do this a few times then the payee matching will automatically figure it out?
Again, I'm a noob with ledger and you could argue I should go look for all the
Assets:Unknown
and figure out how to fix them. I could do that, but it might be simpler if l-a had a way to understand that most of the stuff going on in my Vanguard account is trading cash for stock and stock for cash and it is all in the same account.Also, there is another case with dividend reinvestment where I get something like:
That actually seems correct (and a pretty cool feature of l-a). It is recognizing that I basically earned interest and so in this case the offsetting account is
Income:Interest
. In this particular case I think this is exactly correct. In this case, Vanguard is giving me more shares of VMFXX as a dividend and so if the offsetting account wasMy Traditional IRA
instead ofIncome:Interest
that would definitely cause problems.To summarize:
Assets:Unknown
but the same account (although it is not a huge deal in this case as it will cancel out on the sweep to a money market).Income:Dividends
then the register report gets messed up.What do you think? Possibly the fix is in docs and not in code. For example, the solution might be some hints on setting up payee matching before running l-a to bring in a year of transactions.