Is there a way to refer to the tail-end of the matched account in an
automated transaction, using a variable such as '$account_base' or similar?
The ledger manual has a section that shows how to refer to the matching
posting's account, by using '$account', but that expands to the full
account name, rather than just the end.
I've been using ledger personally for a year, and now I'd like to implement
budgeting. I'm trying to perform budgeting like the "You Need a Budget"
system, and I'm trying to setup my account structure like so:
account Assets:Checking
account Assets:Savings
account Assets:Budget:Rent
account Assets:Budget:Food
account Assets:Budget:Utilities
account Expenses:Rent
account Expenses:Food
account Expenses:Utilities
At the start of the month, I want to put money aside for rent (along with
all other budgetting categories and savings goals).
2018-02-01 Monthly budget
[Assets:Budget:Rent] $600.00
Assets:Checking $-2000.00
Assets:Savings
Now I need an automated transaction that will move the money set aside for
rent back to my checking account whenever I spend that money.
2018-02-06 Rent
Expenses:Rent $600.00
Assets:Checking
Should become this after the automated transaction:
2018-02-06 Rent
Expenses:Rent $600.00
Assets:Checking
[Assets:Budget:Rent] $-600.00
Assets:Checking $600.00
So the automated transaction should look something like this, but using
'$account_base' is not valid:
= Expenses
[Assets:Budget:$account_base] -1.0
Assets:Checking 1.0
Any help with this automated transaction? I've thoroughly searched the
manual on how to do this, but it only explicitly tells you that you can use
'$account' in the posting's account section. I was thinking that other
variables like that might be available, but may be less explicitly
documented in the manual.
I also googled this topic, and found little documentation.
Thanks,
-- Justin
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.