News for hackers. Stuff that matters.
Re:Plain Text Accounting, a guide to Ledger and friends by account-5 on Sunday September 05, 2021 @02:41AM (#28422074)
As someone who "manages" there accounts in spreadsheets what would be the advantages? I'm already downloading CSVs from my accounts which I clean and import into a spreadsheet.

Also can someone link to what the actual text file looks like? The format. I can't find a decent example, I just want to see this human readable format, thanks.

Re:Plain Text Accounting, a guide to Ledger and friends by smichael on Sunday September 05, 2021 @03:05AM (#28422156)
Spreadsheets have lots of strengths. I believe one of the difficulties is (a) managing an increasingly large number of transactions over time, with (b) an uncertain number of postings to (c) arbitrary accounts in a hierarchy. Though I haven't tried myself, I suspect modelling a full double-entry-bookkeeping General Journal in a spreadsheet just gets cumbersome. Secondly, while certain kinds of calculations and queries are easier in a spreadsheet, other kinds of queries and ad hoc reports are easier with PTA tools. Thirdly (big one), the plain text format lends itself to version control (good for data integrity and auditing), scripting and integration, and future-proofness.

An example of Ledger/hledger's main file format:

    2021-01-01 opening balances on january 1st
        assets:checking         $1000  ; a posting, increasing assets:checking's balance by $1000
        assets:cash              $100
        liabilities                $0
        equity                 $-1100  ; each transaction must sum to zero
    
    2021-03-05 client payment
        assets:checking         $2000
        revenues:consulting    $-2000  ; revenues/liabilities/equity normally appear negative
    
    2021-03-20 Sprouts
        expenses:food:groceries  $100
        assets:cash               $40
        assets:checking                ; a missing amount will be inferred ($-140 here)
Re:Plain Text Accounting, a guide to Ledger and friends by smichael on Sunday September 05, 2021 @11:41AM (#28425141)
Another advantage over spreadsheets I forgot: more guide rails and more common ground (shared practices, howtos, support) with other users. Spreadsheets are a tabular report construction kit, PTA is an accounting system construction kit.
Re:Plain Text Accounting, a guide to Ledger and friends by account-5 on Sunday September 05, 2021 @04:36AM (#28422532)
I suppose the biggest barrier for me would be learning double entry bookkeeping as I'm not doing that just now. I wouldn't know where to start. Currently the above makes no sense to me.
Re:Plain Text Accounting, a guide to Ledger and friends by Jtsummers on Sunday September 05, 2021 @11:00AM (#28424826)
The syntax above can be learned easily enough, but double-entry boils down to: Each transaction shows both where money goes and where it comes from, the sum should be 0.

Where it goes and comes from are "accounts", which may or may not correlate to actual accounts like you might think of in personal finance. There are 3 categories of accounts: expenses, assets, liabilities. You own the second two, they are your cash, checking, savings, brokerage as assets and your mortgage, car loan, CCs as liabilities. Expenses are where you spend money outside of your own accounts.

Before getting to expenses, you may have accounts like this for your assets and liabilities:

  assets:cash       $100
  assets:checking  $2000
  liabilities:cc   $-100
  liabilities:car  $-10000
Whenever you transact your money goes from one place to another, so a car payment may look like:

  2021-09-05 Car Payment
    assets:checking    $-500
    liabilities:car     $500
Positive means that that account gets the money, negative it loses the money. Note that it sums to $0. If there were an interest component we may do this:

  2021-09-05 Car Payment
    assets:checking    $-500
    liabilities:car     $400
    expenses:interest   $100
Expenses are not owned by you. They can be broad categories or more specific. Maybe you have two residences and utilities at both:

  expenses:primary:electric:edison:1234 -- your account number
  expenses:secondary:electric:pandg:1234
I wouldn't go that far, I might do:

  expenses:house:electric:primary
  expenses:house:electric:secondary
But the choice is up to you, both work. Think of them as hierarchical tags.
Re:Plain Text Accounting, a guide to Ledger and friends by shubhamkrm on Sunday September 05, 2021 @05:39AM (#28422815)
I found the GNUCash manual to be an excellent introduction to double entry accounting for people with no accounting background. Even my ledger accounts are setup in the same way.
Re:Plain Text Accounting, a guide to Ledger and friends by hiq on Sunday September 05, 2021 @05:38AM (#28422807)
I'm not that familiar with the theory, in my case I just got started and now I'm used to it. Just to take the last example:

    2021-03-20 Sprouts
        expenses:food:groceries  $100
        assets:cash               $40
        assets:checking
This means you took 140 from your checking account, withdrew 40 that you now have in cash, and spent 100 in groceries. Does that still make no sense?
Re:Plain Text Accounting, a guide to Ledger and friends by account-5 on Sunday September 05, 2021 @06:58AM (#28423265)
Honestly no. When I first read it I thought you'd spent 140 on sprouts which I thought was excessive, but each to their own.

Even though you've explained it I'm still struggling to make sense of it. The 3 indented lines don't related at all in an intuitive manner at least for me.

Re:Plain Text Accounting, a guide to Ledger and friends by chromatin on Sunday September 05, 2021 @09:51AM (#28424345)
Understandable, they are using transaction balancing / elision

What they should be showing beginners is:

    2021-03-20 Sprouts
        expenses:food:groceries  $100
        assets:cash               $40
        assets:checking         $-140
How’s that?
Re:Plain Text Accounting, a guide to Ledger and friends by cagey on Sunday September 05, 2021 @10:14AM (#28424499)
A possible source of confusion is that in this context, "Sprouts" is likely the name of a supermarket (not a type of food).
Re:Plain Text Accounting, a guide to Ledger and friends by bokstavkjeks on Sunday September 05, 2021 @10:09AM (#28424464)
I don't think the file format above is especially conductive to learning. In my experience, most people learn double-entry bookkeeping with T accounts; debit is on the left, credit is on the right, and total credit has to equal total debit.

If you're interested, this seems like a fairly decent guide: https://www.open.edu/openlearn/money-business/introduction-b...

Re:Plain Text Accounting, a guide to Ledger and friends by djhworld on Sunday September 05, 2021 @04:02AM (#28422391)
I think the biggest advantages are its just a text file, so you can use version control.

Additionally spreadsheets group logic and data - whilst this is very flexible csn get hairy if you are not disciplined.

Beancount files are just text, and the logic part comes from the beancount engine so there is a clean separation.

Re:Plain Text Accounting, a guide to Ledger and friends by account-5 on Sunday September 05, 2021 @04:34AM (#28422515)
I fully appreciate text. I use plain text with minimal formatting for as much as I can. I tend to save my yearly spreadsheets as CSV for storage as after the year they are not live documents.

My system is obviously not fully tracking everything / double entry. It's just a log transactions on an account. I have a sheet for each account.

Re:Plain Text Accounting, a guide to Ledger and friends by themmes on Sunday September 05, 2021 @02:46AM (#28422091)
Here you will find an example and more format details https://plaintextaccounting.org/quickref/#h.8v2r9qqwt9f8
Re:Plain Text Accounting, a guide to Ledger and friends by account-5 on Sunday September 05, 2021 @03:06AM (#28422158)
Cheers mate.