logoalt Hacker News

simonmic • yesterday at 3:24 PM • 2 replies • view on HN

Some of the past discussions of this can be found starting at https://plaintextaccounting.org/FAQ#where-are-debits-and-cre...

In most (not all) current PTA systems, "Dr" (debit) is written as "" or "+", "Cr" (credit) is written as "-". In this case it's true that that a contra-debit or contra-credit is not a first class concept (because "Dr 1" and "Cr -1" are both written as "1"). Though, hledger can detect it from context, because it knows what is the normal sign for each account type.

As I understand it, contra-debit/credit wasn't a concept in traditional double entry bookkeeping either, or at least, it wasn't written with minus signs ?

In all this time we hadn't seen a good concrete example yet. This might be a good one - I can't follow it right now, but bookmarked it for study - thank you.

PTA is not religious about this sign thing, but we can at least say in practice it does seem to work extremely well for many people with a wide range of accounting needs.


Replies

EvanAnderson • yesterday at 4:22 PM

> As I understand it, contra-credit/debit wasn't a concept in traditional double entry bookkeeping either, or at least, it wasn't written with minus signs?

I learned contra-debit/credit with negative (written surrounded in parenthesis) in 200-level accounting in about 2002. I don't know when that parlance entered the bookkeeping lexicon. (History of double-entry bookkeeping is vaguely interesting to me but it's nothing I've pursued with determination.)

> In all this time we hadn't seen a good concrete example yet. This might be a good one - I can't follow it right now, but bookmarked it for study - thank you.

Glad I could come up with something. In general, my take was that contra accounts exist to keep details visible that otherwise would collapse into transactions and not be visible in a managerial view. Look for contra-asset accounts like "Allowance for Delinquent Accounts" as another example. Purchase discounts as a contra-expense are another place you might look for examples.

> PTA is not religious about this sign thing, but we can at least say in practice it does seem to work extremely well for many people with a wide range of accounting needs.

Agreed. At the end of it all of this bookkeeping is just about making the right numbers available to properly pay taxes, manage how a company is run, and provide investors with the right tools to evaluate a company.

simonmic • yesterday at 7:44 PM

Following up.. here's how a PTA user might model your example:

    2026-01-01 issue bonds, face value 1000, sold at a 5% discount
        liabilities:bonds payable                   -1000
        liabilities:bonds payable:discount             50
        assets:cash                                   950

    2026-12-31 amortise part of the discount as interest expense
        liabilities:bonds payable:discount            -10
        expenses:interest                              10

    $ hledger bs
    Balance Sheet 2026-12-31

                                        || 2026-12-31 
    ====================================++============
     Assets                             ||            
    ------------------------------------++------------
     assets:cash                        ||        950 
    ------------------------------------++------------
                                        ||        950 
    ====================================++============
     Liabilities                        ||            
    ------------------------------------++------------
     liabilities:bonds payable          ||       1000 
     liabilities:bonds payable:discount ||        -40 
    ------------------------------------++------------
                                        ||        960 
    ...
(This particular report shows all the liability signs flipped, for presentation purposes. The discount balance is 40 internally, but displayed as -40.)

Like your example, mine uses a separate contra account for the discount. The only difference is notation: where you'd write a negative credit, we write a positive amount (in effect a debit). But essentially no information has been lost; the report still comes out right.

This PTA app does not track "contra" as a first class property of either the amount or the account. Though, it's evident that the discount balance is contra because it has the opposite sign to the norm for a liability account. This app doesn't enforce that automatically, but we could, by declaring a rule:

    assert none daily  'liabilities:bonds payable:discount' balance:<0
(the rule tests the internal balance, +40 here, not the sign-flipped display balance, so <0 would catch a wrong balance.)

Accounting knowledge still matters; recording a bond discount correctly requires knowing that the discount exists, how it's amortized etc. Signed numbers alone don't supply that knowledge, but nor do Dr/Cr columns I think.

➕ show 1 reply