Confusion about a few things

764 views
Skip to first unread message

tazz_ben

unread,
Feb 26, 2011, 8:52:37 PM2/26/11
to Ledger
Ok, so I want to apologize, I went to b-school, so small stupid things
might be bothering me. I dumped about 50 transactions into a file and
did the balance sheet command on it:

Assets:Checking
Expenses
Ads
Apps
Hosting
Phone
Processing
Income
Credit Cards:PayPal
Pre Payments
Google Checkout
PayPal

So, from what I can tell, ledger does two things that seem strange to
me; (please correct me if I'm just not understanding what it's doing),
it seems to represent credit balances (right column) with a negative
number. Second it doesn't seem to know that expenses and income are
equity accounts (you manual says you can use Expenses and Income --
which I assumed means that they are linked/aliased/whatever as
children of equity) and such should be grouped together.

Also, again small thing, but on a balance sheet assets, liabilities
and equity really should be totalled (even if their zero). Ideally
there should be forming break between them as well (Also negative and
credit balance isn't really the same thing -- it would look really
weird to show revenue as negative number).

John Wiegley

unread,
Feb 27, 2011, 2:07:31 AM2/27/11
to ledge...@googlegroups.com
On Feb 26, 2011, at 8:52 PM, tazz_ben wrote:

> So, from what I can tell, ledger does two things that seem strange to
> me; (please correct me if I'm just not understanding what it's doing),
> it seems to represent credit balances (right column) with a negative
> number. Second it doesn't seem to know that expenses and income are
> equity accounts (you manual says you can use Expenses and Income --
> which I assumed means that they are linked/aliased/whatever as
> children of equity) and such should be grouped together.
>
> Also, again small thing, but on a balance sheet assets, liabilities
> and equity really should be totalled (even if their zero). Ideally
> there should be forming break between them as well (Also negative and
> credit balance isn't really the same thing -- it would look really
> weird to show revenue as negative number).

Could you show me an example of what you think the report should look
like exactly? Your description doesn't make it clear enough for me to
visualize, since I never took a formal class in accounting.

Thank you,
John

tazz_ben

unread,
Feb 27, 2011, 12:34:22 PM2/27/11
to Ledger
So, there are three types of parent accounts in accounting: Assets,
Liabilities, Equity

First, just to clear up a common misunderstanding, debit and credit
simply mean left and right. Without context, that doesn't mean
positive or negative.

Assets have a normal debit (dr) balance, while liabilities and equity
have a credit (cr) balances. That means that an asset account with a
debit balance would be positive while a liability account with a
credit balance would be positive.

A balance sheet is an implementation of the concept that what you own
must equal how you bought it. Ie.

Assets = (Liabilities + Equity)

Or put another way:

My Stuff = How did I buy it?
My Stuff = Money I've borrowed + Profit I've accumulated

So one of the many internal checks in accounting is that this equation
is always holding true, if it's not then you have a problem (note:
this in addition to dr=cr, there are scenarios where dr=cr and the
balance sheet is not equaling).

So, expenses and revenue are "temporary equity" accounts. The idea
is that during a period (like say a month), you accumulate revenue
into the revenue accounts and expenses in the expense accounts. When
you "close" the period (you set those back to zero) and place the
accumulated balance into an equity account. For instance, say you
have 1000 of revenue in January and 500 of expenses. Let's say you
are closing the account for January and staring February. You would
produce an entry like this:

2011/2/1 Closing Entry
Revenue 1000
Expenses 500
Equity 500

(I'm simplifying, you in the above scenario, I'm assuming there is
only one revenue and expense account, but the idea is you close ALL
revenue and expense accounts -- the balance to make that entry equal
will be that periods profit/loss)

Aside:
~~
There is no such thing as an income account. Based on some examples,
I knew you meant revenue, but they're not the same thing. Income is
(some) revenue minus (some) expense. Which revenue and expense
accounts you include depend on what type of income you are trying to
report (net, gross, etc).

Anyhow, I know you need to support backwards compatibility, but you
really should at least allow both "Revenue:" and "Income:" (with your
program knowing they are, in your case, the same thing), then fix the
manual.
~~

If you were taking an intro accounting course, the instructor would
tell you that there is a very specific order to producing financials.
First you produce the income statement, cash flow, *then you close*
(so revenue and expenses will be zero), then you produce the balance
sheet. In practice, you do that for external reports, but you can't
close every-time you need a balance sheet, so you place the temporary
accounts under their respective sections.

So, let's make up numbers:

Assets:

Cash 1000
A/R 200
A. for B/D (50)

Total Assets: 1150

Liabilities:

Credit Card 50

Total Liabilities 50

Equity:
Revenue 200
Bad Debt Ex (50)
Owners' Eq 950

Total Equity: 1100

Some people will also place the liabilities and equity in the right
side of the page, with the assets on the left. I'm not sure that's
necessary as long as they are properly broken up.

So, let's go through a few of these numbers. Cash is an asset account,
it has a positive number because it has a debit balance. Allowance of
bad debt is also an asset account (it is actually a special type of
asset account called a contra account), but it has a credit balance so
it has a negative number. Revenue has a credit balance, but because
it is a type of equity account that is a positive number. Bad debt
expense has a debit balance which means it has a negative number.

If you were to close for the period, the Equity section would be
simplified to :

Equity:
Owners' Eq 1100

Total Equity: 1100

There's also a specific order that accounts should be listed; but I
think that might be expecting too much. So, the big items are:

* Revenue and Expenses are type of equity account
* Equity + Liabilities must equal Assets
* Equity and Liabilities have credit balances
* Assets have debit balances

Thanks!

Ben

Simon Michael

unread,
Feb 28, 2011, 3:27:33 PM2/28/11
to ledge...@googlegroups.com
On 2/27/11 9:34 AM, tazz_ben wrote:
>>> So, from what I can tell, ledger does two things that seem strange to
>>> me; (please correct me if I'm just not understanding what it's doing),

Hi Ben.. thanks for this feedback. I think most of us here have researched accounting/bookkeeping more or less but don't
speak it natively, so perspective from that world is really useful.

>>> it seems to represent credit balances (right column) with a negative

Correct. I'm guessing John as an engineer, and most of us here, found that to be simplest and easiest to keep straight.
To generate reports using the standard credit and debit terms, eg for exchange with a professional bookkeeper, would
require some coding but sounds quite doable.

>>> number. Second it doesn't seem to know that expenses and income are
>>> equity accounts (you manual says you can use Expenses and Income --
>>> which I assumed means that they are linked/aliased/whatever as
>>> children of equity) and such should be grouped together.

I wasn't quite clear on that. I would guess most of us have assets, liabilities, equity, income and expenses as
top-level accounts. Are you saying accounting-savvy folks will put assets, liabilities, and equity at the top, and write
expenses as (eg) equity:draw:some expense category ?)

The main point about ledger here is that it has little or no knowledge of account types; it's up to the user to set up
the chart of accounts appropriately.

One advantage of this is that a beginner can start using just "accounts", with no assets/liabilities/equity
classification - like someone I spoke to on #ledger today. And of course you refine them later as needed.

On the other hand you might argue that enforcing the major account structure up front would reduce head-scratching as
users climb the bookkeeping learning curve. But we currently don't do this.

>>> Also, again small thing, but on a balance sheet assets, liabilities
>>> and equity really should be totalled (even if their zero). Ideally
>>> there should be forming break between them as well (Also negative and
>>> credit balance isn't really the same thing -- it would look really
>>> weird to show revenue as negative number).

As you've noticed, ledger balance shows balances but isn't really a standard balance sheet report - you have to work
harder to get that, using the various display-customizing options and possibly even multiple ledger invocations to get
the exact output and layout you need. I think John is ok with that but I for one would like to be able to get more
accounting-standard reports with a standard built-in command. That would require defining the account types somehow.

> If you were taking an intro accounting course, the instructor would
> tell you that there is a very specific order to producing financials.
> First you produce the income statement, cash flow, *then you close*
> (so revenue and expenses will be zero), then you produce the balance
> sheet. In practice, you do that for external reports, but you can't
> close every-time you need a balance sheet, so you place the temporary
> accounts under their respective sections.

Again, thanks a lot for the clear explanations and examples so far - it's a lot to digest, but I plan to do that.

Cheers - Simon

Roel Vanhout

unread,
Feb 28, 2011, 3:46:56 PM2/28/11
to ledge...@googlegroups.com, tazz_ben
On Sun, Feb 27, 2011 at 2:52 AM, tazz_ben <b...@wbpsystems.com> wrote:
> Ok, so I want to apologize, I went to b-school, so small stupid things
> might be bothering me.  I dumped about 50 transactions into a file and
> did the balance sheet command on it:

<snip>

Ledger doesn't make much sense if you look at it the formal accounting
way. The focus is different - e.g. the various types of automatic
transactions are for people who think like programmers, no accountant
would use those. At first I was confused too and tried to fight the
way it's supposed to work. Now I just use ledger as a, well, 'ledger',
and do the 'post-processing' with simple reports from which I extract
various pieces of information that I then put into more formal
formats. In that sense it works great, an input file that can be
edited with a text editor; you just have to see it in the right
context.

Part of the confusion, imo, comes from the user manual that uses
various terms that have specific meanings in accounting but then are
used 'with a twist' in ledger. The lack of account categories (for
debit and credit accounts, and balance and profit and loss sheet)
makes it non-intuitive to someone who is used to the formal way. I see
ledger as somewhat in-between single- and double entry bookkeeping
(well of course it requires at least two accounts for each
transaction, so in that sense it's double entry - but it doesn't
enforce any of the other requirements for getting books approved,
which to me makes up the other part of 'double entry'). Which is fine
for the personal and small business accounting most people seem to use
it for. It's just something to keep in mind when learning it - ledger
is unlike other accounting packages out there.


cheers,

roel

(disclaimer: I'm a programmer too, I just have had some exposure to
accounting from a couple of courses in law school and from the idiotic
hoops some accountants try to make me jump through.)

tazz_ben

unread,
Feb 28, 2011, 4:04:21 PM2/28/11
to Ledger
Hi Simon -

> I wasn't quite clear on that. I would guess most of us have assets, liabilities, equity, income and expenses as
> top-level accounts. Are you saying accounting-savvy folks will put assets, liabilities, and equity at the top, and write
> expenses as (eg) equity:draw:some expense category ?)

GAAP really centers around the balance sheet (this is why in a 201
Acctg class they teach financial statements first before journal
entries); you can have whatever accounts you want, but there are
*only* three types: Assets, Liabilities, Equity. If you look at my
second reply I explain why this is. As a random example look at
Apple's balance sheet:

http://finance.yahoo.com/q/bs?s=AAPL+Balance+Sheet&annual

Notice the line that says retained earnings? (There are some other
lines because this is a public company, but in a small company this
would be the only line), that is the result of closing operations
(explained in my second post) -- ie. it is the sum of previous
earnings (I selected AAPL in part because they don't do dividends
which would require more lines). That's why I called revenue and
expenses temporary equity accounts; they are set to zero at the
beginning of every period.

For a system to be double entry, it has to have some understanding of
this. The reason is while DR=CR is a necessary condition, it isn't a
sufficient condition. However, Assets = (Liabilities + Equity) is a
sufficient condition.

> The main point about ledger here is that it has little or no knowledge of account types; it's up to the user to set up
> the chart of accounts appropriately.

Yeah, I finally figured that out; so I just searched and replaced and
changed my Expense/Income to categories under equity. The issue for
me was the use in the manual, I assumed that the expense and income
accounts were tied internally to Equity because I knew they had to
be. I think it could be appropriate to just say in the manual that
there are three types of accounts (instead of saying there are five,
which is what it currently says) and in your examples put expense/
revenue under equity.

tazz_ben

unread,
Feb 28, 2011, 4:54:25 PM2/28/11
to Ledger
Roel -

I'm a programmer as well (I own WBP SYSTEMS). And I'm not an
accountant (all my PhD level stuff is in economics, however, I do have
four years of accounting -- but even my undergraduate degree was in
finance, not accounting). So, I promise you I'm not one of those
people who cares about rules just because they are rules. I can't
know for sure, but I suspect the "idiotic hoops" were things imposed
by the IRS or state (ie. tax accounting). Accounting, as in GAAP is
actually rather beautiful in it's honesty and almost nothing is random
or idiotic (with a nice big exception to defined benefit pensions --
which are accounted for in an idiotic manner). (Also note that I'm not
commenting on perhaps idiotic company polices that the accountant was
enforcing, but that would the person, not the method)

So, I actually don't care so much about semantic things like ordering
the accounts properly, or making the format pretty,etc. But, having
ledger understand that Assets = (Liabilities + Equity), that is a big
deal, because that's about accuracy. The whole point of double entry
accounting is that you trust the numbers that come out of it. And
this is an area where accountants and software engineers agree: both
groups care supremely about accuracy. (Plus you should care about
accuracy in your books whether you are a small company or a big
company).

But to get Assets = (Liabilities + Equity), you got to get the +/-
sign right, you can't just have every credit balance be a negative
numbers (because when that's an asset account, that's true, but when
it is a liability or equity that's wrong).

Anyhow, just my thoughts.

Roel Vanhout

unread,
Feb 28, 2011, 6:13:56 PM2/28/11
to ledge...@googlegroups.com
Oh I wasn't ragging on you if that's how it came across - that was
just a side remark as I had an especially bad day today, in part
because of an accountant who's more interested in following minute
rules than caring about the business case. And yeah it was tax
related.

Anyway, as much as I like to discuss the aesthetics of various
accounting practices over a nice beer ;) , it's not how ledger works,
in my experience. Balancing accounts is impossible without a way to
tell it what accounts to balance against each other. That's what my
remark on the 'half-way' state of ledger referred to - it's mostly
cash accounting but with some extra check in the form of
counter-accounts. Plus automation for recurring expenses or splitting
across accounts. One can debate if that's desirable but I think for
most users it's fine, most people wouldn't grok a more 'strict'
operating mode, or rather they would if they'd spend a lot of time on
it, but why do that when other options work OK.

cheers,

roel


PS I may botch some of the terms in my posts - I only ever work in a
couple of European contexts.
PS2 I also disagree about the beauty of accounting systems - like I
said, in the context of a law education our focus was on how to detect
lies with numbers, and in my experience accounting is anything but
deterministic; there are 100 ways to do all the things that are a
little bit more complicated than a cash sale, and everybody (all
accountants) has their own pet peeves they feel are so important - so
important that they need to be explained in minute detail at $150 /
hour. Whoops there I go again ;)

Martin Michlmayr

unread,
Mar 5, 2011, 9:59:43 AM3/5/11
to ledge...@googlegroups.com
* tazz_ben <b...@wbpsystems.com> [2011-02-26 17:52]:

> Second it doesn't seem to know that expenses and income are
> equity accounts (you manual says you can use Expenses and Income --
> which I assumed means that they are linked/aliased/whatever as
> children of equity) and such should be grouped together.

ledger doesn't know anything about these things... it's basically just
a calculator. The manual uses Expenses and Income as examples but you
could use any other account names that you prefer. ledger doesn't
care and doesn't know which accounts normally have a credit or debit
balance.

--
Martin Michlmayr
http://www.cyrius.com/

Martin Michlmayr

unread,
Mar 5, 2011, 10:18:56 AM3/5/11
to ledge...@googlegroups.com
* tazz_ben <b...@wbpsystems.com> [2011-02-28 13:54]:

> But, having ledger understand that Assets = (Liabilities + Equity),
> that is a big deal, because that's about accuracy. The whole point
> of double entry accounting is that you trust the numbers that come
> out of it.

ledger does get the accounting equation right. When you do "ledger
bal", the sum at the end must be 0, otherwise you have a problem.
However, ledger approaches the accounting equation in a way that is
quite unusual for people with an account background. To make it
clearer how ledger sees the world, we can transform the accounting
equation from
Assets = Liabilities + Equity
to
Assets - Liabilities - Equity = 0

In accounting terms, you'd say that you have $100 in assets and
that equity is $100:
Assets - Liabilities - Equity = $100 - 0 - $100 = 0

However, ledger doesn't know anything about credit or debit
balances... it essentially just adds up things and makes sure that
all + and - add up to 0.

The way it does this is to require liabilities and equity to be
negative. So in ledger terms, you'd say that you have +$100 in the
bank and an equity of -$100. This adds up to 0, which means that
things balance.

This approach comes quite natural from a "ledger as calculator" point
of view, but I agree that it's confusing for people with an accounting
background. I started with ledger and then learned about accounting
and this made it more difficult to understand debit and credit
balances.

But once you get over it, it's not too hard to deal with. Basically,
you just have to mentally invert all things that you know are credit
accounts. So when you see -$100 equity in ledger, you know that it's
a credit account and therefore in accounting speech a $100 equity.
When you see +$50 liability in ledger, you know that in accounting
this is a ($50) liability, i.e. someone owes you.

Is there a way to improve ledger? I'm not sure it's possible to
change the input format but it should at least be possible to improve
some of the reporting functionality. For example, it would be
possible to extend ledger so people can say which accounts are credit
or debit accounts and ledger bal could get an option so it would
display things as debits and credits.

Anyway, this is just my opinion as a ledger user. I'm sure John (the
author) can explain his design choices better.

tazz_ben

unread,
Mar 5, 2011, 11:00:41 AM3/5/11
to Ledger
Actually, what it is doing is making sure debits = credits, which I
explained above, is not a sufficient condition, just a necessary one.
There are a number of scenarios (particularly surrounding work-in-
progress accounts) where you can make a minor error that does not blow
up debit=credits but does blow up the balance sheet (the short version
is that the balance sheet detects imposible balances while dr=cr does
not).

Anyhow, I've already given my thoughts in the above posts, it's
obviously the developer's choice on whether to fix it or not. And it
was just my opinion as someone with a financial background; I'm not
expecting anything, John is after all doing this for free.

J.L. Reid

unread,
Mar 13, 2011, 11:19:18 PM3/13/11
to Ledger
Wow, I've just started using Ledger and ran smack into this issue.

What's confusing is the statement that Ledger uses double-entry
accounting, without drawing attention to the fact that it isn't Double-
Entry Accounting or Bookkeeping as you might formally learn.

I'm wondering, though, if it couldn't be brought "in-line" with
standard double-entry accounting by simply having users who wanted to
apply those rules create a config file that basically lists their
debit and credit accounts.

Ledger would then check for this config file and if found switch to
formal double-entry mode.

In this mode it would simply tally up all the credit accounts and then
all the debit accounts associated with the ledger in question, and
ensure that the sums are equal.

Otherwise, I'm trying to "reconcile" how to make sense of invoicing
and asset accumulation... whereby in standard double-entry accounting
an invoice would be debited as an asset (usually tracked under an
accounts receivable account or sub-account) and the corresponding
credit would be an income (or revenue) account. In this example,
sending out an invoice for $X would be reflected in an increase of X
in both the debit and credit columns.

If this were the only transaction, then both columns would equal X and
the book is balanced (as opposed to zeroed-out as Ledger currently
handles it). But presently, if I list an invoice as an accounts
receivable transaction +X, I'd have to deduct that amount from
somewhere else... now this isn't that confusing, but it is a minor
stumbling block. You'd just have to accept that a report of your
cumulative income will be a negative number...

What's more confusing is accumulated assets.

In standard double-entry accounting, a purchase of an office supply or
piece of equipment would create a negative debit from your bank
account (assuming you're not using a credit card to make the
purchase), or -$Y, An expense transaction in the credit column $Y, and
an asset transaction, either Asset:Office Supply or Asset:Equipment
(or something similar), of $Y. The rationale is the item you
purchased offsets its cost by increasing the value of your company the
same amount.

This make sense because if the asset isn't depreciated--you haven't
used it, it hasn't aged beyond a reasonable point, you still have it
in your possession, etc.--you could sell it to recoup what you paid
for it or use its purchase value as collateral for a loan.

But how would I reflect this in ledger? I can live with my expenses
having a negative value, but what inverse transaction should I have to
zero-out the asset value of what I bought?

Again, I think--and I'm not speaking as a programmer--that this
"problem" can be resolved with a file that tells Ledger which accounts
are debit accounts or credit accounts, and then having the app simply
tally each "side" debit or credit and compare the two numbers.

(Sorry if this message ran unnecessarily long).



-JLR


On Mar 5, 12:00 pm, tazz_ben <b...@wbpsystems.com> wrote:
> Actually, what it is doing is making sure debits = credits, which I
> explained above, is not a sufficient condition, just a necessary one.
> There are a number of scenarios (particularly surrounding work-in-
> progress accounts) where you can make a minor error that does not blow
> up debit=credits but does blow up thebalancesheet (the short version
> is that thebalancesheet detects imposible balances while dr=cr does

Michael Norrish

unread,
Mar 14, 2011, 1:53:36 AM3/14/11
to ledge...@googlegroups.com
On 14/03/11 2:19 PM, J.L. Reid wrote:
What's more confusing is accumulated assets.

In standard double-entry accounting, a purchase of an office supply or
piece of equipment would create a negative debit from your bank
account (assuming you're not using a credit card to make the
purchase), or -$Y, An expense transaction in the credit column $Y, and
an asset transaction, either Asset:Office Supply or Asset:Equipment
(or something similar), of $Y.  The rationale is the item you
purchased offsets its cost by increasing the value of your company the
same amount.

[...]But how would I reflect this in ledger? 

One transaction could be:

2011/03/14 * OfficeSupplies.com
  Asset:Office Supplies:Paper     1 Ream
  Asset:Bank Balance              -$5.00

It took me a while to realise this myself, but Ledger considers this to balance, and knows that at this time, $5 and 1 ream of paper had the same value.

But this has the disadvantage that it doesn't put anything into your expense account.  So you could add to the transaction and make it:

2011/03/14 * OfficeSupplies.com
  Asset:Office Supplies:Paper  1 Ream
  External Parties:Paper       -1 Ream
  Expenses:Office Supplies     $5
  Asset:Bank Balance           -$5

Ledger won't (I think) realise that the paper cost $5 in this case, but it's clear from the transaction that this is the case.  You have also created a weird "external parties" account, but hey.

No doubt there are other options.

Michael
Reply all
Reply to author
Forward
0 new messages