And double entry bookkeeping should be both easy to explain (there are countless articles for it, precisely because it is a pretty easy concept) And easy to understand if you have ever tried to keep a ledger of transactions around and wanted to audit it for errors.
- Assets minus Liabilities = Equity (net worth)
- Your bank account or cash balance increases on the debit side
From this you can figure out that if you borrowed money, the debt increases on the credit side and the cash influx debits your bank account. The same goes for an income.
Sum of entries of assets/liabilities accounts = Equity. Moreover assets and liabilities become one type.
Clearly not. But this is why I let an accountant do it.
That's probably not the way I would have designed it. I'd probably have designed it from the point of view of the account, so that we'd all agree on what addition and subtraction mean. But that's my programmery point of view. I imagine that they're more concerned with the flows -- not just the numbers, but especially the actual materials being bought and sold.
Your bank account is really two accounts: an asset on your books, and a liability on the bank’s books.
When you talk about accounting for physical inventory, that’s a whole new can of worms.
The most popular way I see is this:
- you keep track of goods by their cost to you (not their value once sold)
- every time you buy item xyz, you increase an asset account (perhaps called “stock” and the transaction labeled “xyz”). You also keep track of the number of xyz. Say you buy 10 for $10 each, then another 10 for $20 each. Now you have 20 and your xyz is valued at $300. Average cost: $15
- every time you sell or lose some xyz, you adjust the number of xyz, and reduce the asset account by the average value of those items at the time of the transaction, or $15 in this example. The other account would be cost_of_goods_sold or stock_shrinkage.
Many other approaches also work.
Think about how you're going to do that with your concept. You will likely end up with something extremely close to what double entry accounting is after a few iterations
The accounting equation is: Assets = Equity + Liabilities.
For a transaction to be valid it needs to keep that equation in balance. Let's say we have two asset accounts A1, A2 and two Liability accounts L1, L2.
A1 + A2 = Equity + L1 + L2
And any of these sorts of transactions would keep it balanced:
(A1 + X) + (A2 - X) = Equity + L1 + L2 [0]
(A1 + X) + A2 = Equity + (L1 + X) + L2 [1]
(A1 - X) + A2 = Equity + (L1 - X) + L2 [2]
A1 + A2 = Equity + (L1 + X) + (L2 - X) [3]
Now, here is the key insight: "Debit" and "Credit" are defined so that a valid transaction consists of the pairing of a debit and credit regardless of whether the halves of the transaction are on the same side of the equation or not. It does this by having them change sign when moved to the other side.
More concretely, debit is positive for assets, credit is positive for liabilities. And then the four transaction examples above are:
[0]: debit X to A1; credit X to A2
[1]: debit X to A1; credit X to L1
[2]: credit X to A1; debit X to L1
[3]: credit X to L1; debit X to L2
You can debit and credit to any arbitrary accounts, and so long as the convention is followed and debits and credits are equal, the accounting equation will remain balanced.
Another way of looking like this is with parity. A transaction consists of an even parity part "debit" and an odd parity part "credit". Moving to the other side of the equation is an odd parity operation and so a credit on the RHS has double odd parity, which means it adds to those accounts (and debit, with odd parity, subtracts).