In article 
<cak21+hp9zp05erd8fhkkqtx-xglzyh93cxxv_r+05605e43...@mail.gmail.com>,
 Martin Blais <[email protected]> wrote:

> Really? This surprises me. I read this as a reasonable assumption and
> looked up the Ledger doc for it but could not find it.
> 
> It makes sense to me that one may want to restrict balancing transactions
> to accounts with no virtual transactions at all and vice-versa, segregating
> accounts by whether their transactions are all virtual or none at all.
> Otherwise the accounting equation is not guaranteed to sum to zero! How do
> these virtual postings get handled when you transfer net-income to equity
> for drawing out a balance sheet?
> 
> In Beancount 2.0 I removed virtual postings for that reason, and also
> because their availability always pointed me to a misuse of how I booked
> many of my transactions, in most instances I was using virtual accounts as
> a crutch. By not having them, it forced me to get creative and figure out
> how to book my Ledger right, and now they're mostly superfluous (at least
> my use case, I claim you don't need them). I'm thinking about reintroducing
> something like them eventually: a Virtual:* account hierarchy separate from
> Assets/Liabilities/Equity/Income/Expenses that would not go into the
> accounting equation nor get balance checks (no special syntax except for
> the Virtual: prefix). In other words, instead of virtual POSTINGS, you
> would have virtual ACCOUNTS, and it would be understood that those
> accumulators don't participate in the accounting equation, they're there to
> count other things. In fact, they could be a great way for plugins to
> automatically calculate and present various values without disrupting the
> user's DE transactions.
> 
> Any thoughts?

@Jostein: I have concluded some time ago that keeping virtual and 
non-virtual accounts distinct is a best practice (good tip for 
LedgerTips?). This can be easily achieved without much inconvenience by 
using two accounts sharing a common prefix instead of one account.

I think that Ledger's behavior is not only a reasonable assumption, but 
a requirement: I can't recall the details off the top of my head (maybe 
someone else will help), but I'm pretty sure that creating equity 
reports is a use case that *requires* separate virtual and non-virtual 
accounts to avoid ambiguities.

@Martin: I use virtual accounts sparingly, but there are situations 
where they are logically necessary. Keeping in mind that I am not an 
accountant, consider the following example: an employee in the public 
sector gets a salary that is taxed in advance. He may get a monthly 
statement with the following information:

Gross income: $5200
Family allowance (tax-exempt): $100
Taxes: $1700
Net income: $3500

The net income is the money that he eventually gets in the bank. He may 
keep track of this information as follows:

2013/05/17 * Myself
    Assets:Checking:Myself          $3500.00
    Income:Salary:Family Allowance  $-100.00
    Income:Salary:Taxable:Net
    [Expenses:Taxes:Salary]         $1700.00
    [Income:Salary:Taxable:Taxes]  $-1700.00

Since the employee never really gets the taxed amount, I think that 
those are conceptually virtual postings and must be treated as such. 
What do you think?

Now, a balance report including virtual postings will show all the 
details:

    ledger bal myself income taxes

            $3500.00  Assets:Checking:Myself
            $1700.00  Expenses:Taxes:Salary
           $-5200.00  Income:Salary
            $-100.00    Family Allowance
           $-5100.00    Taxable
           $-3400.00      Net
           $-1700.00      Taxes
--------------------
                   0

A balance report without virtual transactions will only show the net 
income:

    ledger bal myself income taxes --real

            $3500.00  Assets:Checking:Myself
           $-3500.00  Income:Salary
            $-100.00    Family Allowance
           $-3400.00    Taxable:Net
--------------------
                   0


Enjoy,
Life

-- 

--- 
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.

Reply via email to