On Aug 7, 9:03 pm, John Wiegley <[email protected]> wrote:
> I would say either use -B or -X '$'.  But I'm not sure exactly what you want,
> since your question seems to preclude the use of -X?

I want (Virtual Account) to actually contain $20 so that other
transactions can add or remove dollars to/from it. Not 5 units which I
can display as $20 via -X, -B or -V.

If that's not directly possible I think I could live with the
workaround:

= /^Asset:Checking/&p/Buying Shares/
    (Virtual Account)                   -1

if I could find the right syntax for "Account name matches X and payee
matches Y."

The reason I want this is that I'm experimenting with using virtual
accounts to implement an "envelope budgeting" system, similar to
something like YNAB. I have a virtual account for each budget envelope
and automated rules which withdraw money from the appropriate envelope
based on the expense category. At the start of each month I look at
last month's income, decide on a budget for the coming month and
manually create a txn to add money to the envelope accounts.

The system is working perfectly as long as I stick to a single
commodity. The problem arises when I want to say "This month I budget
£100 to go towards my pension". Since my pension consists of a
different commodity I have to say "This month I budget 12.3456
pension_units @@ £100 to go towards my pension" which isn't ideal
because at the time I do the budget I don't know how many units £100
will buy. If I could fix the problem described in the original post
then I could go back to saying "This month I budget £100 to go towards
my pension"

BTW: I am aware of period transactions and the budgeting tools built
into ledger. I experimented with them for a while but found them to be
a bad fit for my usage. Which is why I decide to try rolling my own
system.

- Richard

Reply via email to