On Sat, May 17, 2014 at 1:10 PM, Lifepillar <[email protected]>wrote:
> 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. > One critical aspect of the DE method is that A + L + E + I + X = 0. If you allow transactions to break the rule (by allowing virtual postings to make arbitrary credits/debits to accounts with non-virtual postings) you lose that guarantee. Transferring NI to the equity accounts to draw a balance sheet at some point in time requires the equation to hold, that's one example. Same goes to summarizing past history (summarizing it with transactions to opening-balances). More fundamentally, the beauty of the DE method is that guarantee that if each of the transactions balances, groupings of them will do too. I still don't see a way to integrate virtual postings within that framework, other than strictly segregating those virtual postings on their own and separate from the rest of the postings, or to filter out virtual postings before doing processing. So I agree with you about keeping virtual and non-virtual distinct, but I'm not convinced yet that the system allowing you to break that rule is a wise decision. > > @Martin: I use virtual accounts sparingly, but there are situations > where they are logically necessary. You are providing an almost perfect example of how virtual transactions allow you to shoot yourself in the foot (detailed comments below). 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? > I think in this case you're simply doing this wrong and you don't need virtual postings at all. Here's how I would do this: - Income counts the gross income amount ($5,200). - Tax withholding (not just for govt accounts, BTW) is usually recorded as a regular (non-virtual) expense, that is, you received an expense of that corresponding amount that the government recorded in your name. - Your non-taxable allowance can be tracked in a separate contra income account (that is, one with a positive amount). That's what I do for some of my deductions. 2013/05/16 * Myself Income:Employer:Salary -5200.00 USD Income:Employer:Deductions:FamilyAllowance 100.00 USD Assets:Bank:Checking 3500.00 USD Expenses:Taxes:Salary 1700.00 USD Your "net" income is simply the balance of the Income:Employer:Salary account - Expenses:Taxes:* accounts. You can write a query to calculate it. Here's how I actually do this (from my Ledger, removed numbers, kept the signs): 2014-05-07 * "GOOGLE INC PAYROLL" ^google-XXXXXXX Assets:US:MyBank:Checking XXXX.XX USD Income:US:Google:GroupTermLife -XXXX.XX USD Income:US:Google:Salary -XXXX.XX USD Income:US:Google:Deductions:Dental XXXX.XX USD Income:US:Google:Deductions:GroupTermLife XXXX.XX USD Income:US:Google:Deductions:InternetReimbursement -XXXX.XX USD Income:US:Google:Deductions:Medical XXXX.XX USD Income:US:Google:Deductions:TransitPreTax XXXX.XX USD Income:US:Google:Deductions:Vision XXXX.XX USD Expenses:Taxes:US:Google:Tax:Medicare XXXX.XX USD Expenses:Taxes:US:Google:Tax:Federal XXXX.XX USD Expenses:Taxes:US:Google:Tax:City XXXX.XX USD Expenses:Taxes:US:Google:Tax:SDI XXXX.XX USD Expenses:Taxes:US:Google:Tax:State XXXX.XX USD Expenses:Taxes:US:Google:Tax:SocSec XXXX.XX USD Assets:US:Google:Vacation X.XX VACHR Income:US:Google:Vacation -X.XX VACHR I order the postings in the same order that they show up in the paystub so that it's easy to update new entries (I do this every couple of months, download the stubs and update my ledger). No virtual postings. Auxiliary note: One might argue that the tax withheld sitting at the government in an account with your name on it is an "Asset" account (one like that for each tax year), and that the expense only gets incurred at the time you make your tax filing for that year (e.g. the following April) that includes all your deductions and special situation (e.g. married status or not and everything that changes according to that), and that would work out as well, but the problem with using that approach is that your balance sheet, throughout the year, would reflect the taxes you are to pay later on (making your assets look inflated) and unless you would accompany it with a corresponding account payable liability account, that would be confusing. I prefer to account for taxes as an Expense, so that throughout the year my income statement includes a good approximation of what my tax expenses will turn out to be for that year (which is exactly what source withholding is supposed to be), and at the time of filing I make an adjustment on that same expenses account when I compute the exact amount. I'm starting to think that I should start creating a distinct expense account for each tax year, because that's how both the Canadian and US governments handle it: amounts that you post get booked to a particular year (I've had cases where I'd make a payment online and had to call them afterwards so they would move the amount to the right year bucket). This way I could track the sums owed _for each year_ and file the corresponding paper statements together by year and if there are adjustments to be made in future years (e.g. an audit, shit happens) then it would get booked correctly and I could still calculate my taxes/gross ratio correctly. Thoughts? > > 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. > -- --- 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.
