News for hackers. Stuff that matters.
Re:Double Entry Accounting for Developers by jimnotgym on Tuesday July 28, 2020 @07:51AM (#23974734)
The beauty of double entry is that if you have one entry you are sure of you can derive the rest. The way I think of it is that a cost is a debit. Everything else can be derived from this.

Buy an apple dr food expense cr bank. Buy an apple on credit dr food expense cr creditors. Pay that creditor dr creditors cr bank

What a good idea to teach it in school.

Disclosure: I'm a trained accountant, but this is just what works from me! Maybe because I started as a cost accountant. Lots of ledger clerks tell me that they start with the axiom that the bank is backwards, so you credit money out.

One other thing that helps some people is the convention of writing debits and credits in a single column, with credits as negative. Then the column must sum to zero. The balance on any account is just its sum. That might really help anyone thinking of storing transactions in a database... and you already know how to run a consistency check since the whole ledger always sums to zero.

There are no comments on this comment yet.