Live data from Hacker News

Double-entry bookkeeping as a directed graph

matheusportela.com

331–340 of 388 posts

Re: Double-entry bookkeeping as a directed graph

#331

Double-entry bookkeeping is very easy to understand once you ditch the ridiculous "credit" and "debit" terminology. Essentially, the goal is to keep the accounting equation true at all times. The equation is: Equity = Assets - Liabilities. Eventually, earnings (Income - Expenses) will become part of equity, so splitting that out, you have: Equity + Income - Expenses = Assets - Liabilities. Rearranging to get rid of t…

Yeah, I think a more intuitive way is to replace credit and debit with State and Change as the pair of things in double-entry. It means that you don't have to swap meanings based on context and can use negative numbers intuitively. State Accounts track your net worth Assets: what you own Liabilities: what you owe Change Accounts track why your net worth changes Income: what you've earned Expense: what you've spent Th…

> +Asset +Income aka sold something

Don't you mean -Asset here?

Re: Double-entry bookkeeping as a directed graph

#332
post #287

Earlier quoted context omitted.

Sure, but if you want to keep your terminology consistent with the math, you would then have to make a distinction based on the types of the accounts involved in a journal entry. E.g, this would be correct: increase bank increase equity but this would be incorrect: increase bank increase receivables If all numbers are positive then there would be no way to check whether the journal entries balance out without conside…

> you would then have to make a distinction based on the types of the accounts involved in a journal entry That's right. The distinction is based on whether the account represents an asset or a liability. > increase bank > increase receivables You would have to define what you mean by "bank" in order for this to make sense. But in general, receivables represent money that a company is owed from orders that have not y…

>You would have to define what you mean by "bank" in order for this to make sense.

Bank means bank ledger account. The bank balance and receivables cannot both increase because they are both assets.

>That's right. The distinction is based on whether the account represents an asset or a liability. ... A completely equivalent formulation is that liabilities have negative signs attached to them

Understood. My point was merely that you cannot just change the labels.

The downside of this approach is that you would no longer be able to see whether a journal entry balances out based on the labels alone.

Re: Double-entry bookkeeping as a directed graph

#333
post #287

Earlier quoted context omitted.

> you would then have to make a distinction based on the types of the accounts involved in a journal entry That's right. The distinction is based on whether the account represents an asset or a liability. > increase bank > increase receivables You would have to define what you mean by "bank" in order for this to make sense. But in general, receivables represent money that a company is owed from orders that have not y…

>You would have to define what you mean by "bank" in order for this to make sense. Bank means bank ledger account. The bank balance and receivables cannot both increase because they are both assets. >That's right. The distinction is based on whether the account represents an asset or a liability. ... A completely equivalent formulation is that liabilities have negative signs attached to them Understood. My point was…

> The downside of this approach is that you would no longer be able to see whether a journal entry balances out based on the labels alone.

Yeah, well, there is this cool new invention called a "digital computer" that can help a lot with that. You don't have to keep the ledger on paper using quill and ink any more.

Re: Double-entry bookkeeping as a directed graph

#334
post #333

Earlier quoted context omitted.

>You would have to define what you mean by "bank" in order for this to make sense. Bank means bank ledger account. The bank balance and receivables cannot both increase because they are both assets. >That's right. The distinction is based on whether the account represents an asset or a liability. ... A completely equivalent formulation is that liabilities have negative signs attached to them Understood. My point was…

> The downside of this approach is that you would no longer be able to see whether a journal entry balances out based on the labels alone. Yeah, well, there is this cool new invention called a "digital computer" that can help a lot with that. You don't have to keep the ledger on paper using quill and ink any more.

Absolutely, but digital documents are not accounting software either. Communication would definitely get harder if we lose debit/credit and with it the left/right visualisation of T accounts.

Perhaps some simple convention would help, like attaching +/- to account names. We do have account numbers and accountants know their meaning but most people don't.

Re: Double-entry bookkeeping as a directed graph

#335
post #333

Earlier quoted context omitted.

> The downside of this approach is that you would no longer be able to see whether a journal entry balances out based on the labels alone. Yeah, well, there is this cool new invention called a "digital computer" that can help a lot with that. You don't have to keep the ledger on paper using quill and ink any more.

Absolutely, but digital documents are not accounting software either. Communication would definitely get harder if we lose debit/credit and with it the left/right visualisation of T accounts. Perhaps some simple convention would help, like attaching +/- to account names. We do have account numbers and accountants know their meaning but most people don't.

> like attaching +/- to account names

Or "asset" and "liability". (Big displays are a thing now too.)

Re: Double-entry bookkeeping as a directed graph

#336
post #335

Earlier quoted context omitted.

Absolutely, but digital documents are not accounting software either. Communication would definitely get harder if we lose debit/credit and with it the left/right visualisation of T accounts. Perhaps some simple convention would help, like attaching +/- to account names. We do have account numbers and accountants know their meaning but most people don't.

> like attaching +/- to account names Or "asset" and "liability". (Big displays are a thing now too.)

It would be very confusing to label expense accounts as "liability".

Liability has a very specific meaning (debt) and expenses do not necessarily increase liability.

And then there are accounts that can be assets or liabilities depending on their balance.

(Besides, very small displays a thing now too)

Re: Double-entry bookkeeping as a directed graph

#337
post #335

Earlier quoted context omitted.

> like attaching +/- to account names Or "asset" and "liability". (Big displays are a thing now too.)

It would be very confusing to label expense accounts as "liability". Liability has a very specific meaning (debt) and expenses do not necessarily increase liability. And then there are accounts that can be assets or liabilities depending on their balance. (Besides, very small displays a thing now too)

> It would be very confusing to label expense accounts as "liability".

Why?

> expenses do not necessarily increase liability.

That depends on what you mean by "expenses". If you give someone an expense account, that is a commitment to make payments for expenses, i.e. debt, so it's a liability. When you actually pay for those expenses (or reimburse someone for incurring those expenses) you are paying off debt and reducing your liabilities. Why is that confusing?

> And then there are accounts that can be assets or liabilities depending on their balance.

Sure. So? An asset account is one which represents assets when its balance is positive, and a liability account is one which represents liabilities when its balance is positive. A negative balance in an asset account is a liability, and a negative balance in a liability account (like a credit card, for example) is an asset.

You could do away with this convention and just represent all assets as positive values and all liabilities as negative, but people are used to distinguishing "money that you have" from "money that you owe" and having both of those represented by positive numbers in the usual case.

> very small displays a thing now too

Not for accountants.

Re: Double-entry bookkeeping as a directed graph

#338
post #337

Earlier quoted context omitted.

It would be very confusing to label expense accounts as "liability". Liability has a very specific meaning (debt) and expenses do not necessarily increase liability. And then there are accounts that can be assets or liabilities depending on their balance. (Besides, very small displays a thing now too)

> It would be very confusing to label expense accounts as "liability". Why? > expenses do not necessarily increase liability. That depends on what you mean by "expenses". If you give someone an expense account, that is a commitment to make payments for expenses, i.e. debt, so it's a liability. When you actually pay for those expenses (or reimburse someone for incurring those expenses) you are paying off debt and redu…

>That depends on what you mean by "expenses". If you give someone an expense account, that is a commitment to make payments for expenses, i.e. debt, so it's a liability.

This is not what expense account means in accounting. An expense account is an account that records expenses incurred such as your AWS bill, rent payments or salaries paid.

These are not liabilities and labelling them as such is more than confusing.

>Sure. So? An asset account is one which represents assets when its balance is positive, and a liability account is one which represents liabilities when its balance is positive.

Exactly, so how do you label it if it can be either? The only way I see is to label it according to its main purpose and accept that it's sometimes semantically wrong. That's effectively what the chart of accounts does.

Re: Double-entry bookkeeping as a directed graph

#339
post #192

Earlier quoted context omitted.

>Use the intuitive meaning of the words: a credit means you have money coming in, a debit means you have money going out. An increase in assets, income, or equity is a credit, and an increase in expenses or liabilities is a debit, and vice versa. An increase in assets is a debit. >Or, alternatively, just use "credit" for any increase, and "debit" for any decrease. How is this consistent with the fact that an increase…

You have completely missed the point, which is that the way in which accountants use these words is unnecessarily confusing because it does not align with the common English definitions of the words "credit" and "debit".

The common English use of 'credit' and 'debit' is correct, as they ought to be since we learned them from banks.

Most people are only aware of one type of account, a liability account managed by the bank in their name.

The mistake is that we talk about them as "our" accounts.

Re: Double-entry bookkeeping as a directed graph

#340

Earlier quoted context omitted.

> Don't store the account data. Instead store the transactions. Compute the accounts from that. The table "Transactions" should have the fields: Date, Amount, SourceAccount, TargetAccount, Description. This is a bad design, please don't do this. The better design is to have header and detail tables: Header: TransactionID, Date, Description, (other fields as required, e.g., posting status, reconciliation status, etc)…

yes, that's the gnu cash implementation (also used by formance for example) - I don't love it tbh, yes you can add multiple postings under a single transaction, but.. if you look at one of those postings, or just the transaction in general you don't directly know which posting originates from what account, you have to sorta map it based on amounts

Jumping-in as I happen to know formance very well; I'm 100% agreeing with the need to know what posting originates from what account, which is why formance transaction format is essentially a container for postings, which themselves are a quantified, directed relation between exactly 2 accounts. So a transaction can indeed impact N >= 2 accounts, but a posting within a transaction will always relate exactly 2 accounts.
Post reply on HN