You could record it as an expense when you buy it, and not keep track of uneaten hot dogs.
2026-12-01 buy a pack of 6 hot dogs
assets:cash -12
expenses:food 12
But if you want to keep track of them, you would record them as a prepaid asset. When you eat them, that becomes an expense.
2026-12-01 buy a pack of 6 hot dogs
assets:cash -12
assets:prepaid:hot dogs 12
2026-12-02 eat two
assets:prepaid:hot dogs -4
expenses:food 4
Depreciation is something different: it would be like the gradual loss of value each day as stored hot dogs lose their freshness.
Except it's for long term assets, like a car or office equipment. Hot dogs don't depreciate, they spoil.
2026-12-10 two hot dogs went bad, thrown out
assets:prepaid:hot dogs -4
expenses:food:spoilage 4
You could also track the hot dogs themselves, and perhaps their location (inventory tracking), in parallel with the money.
2026-12-01 buy a pack of 6 hot dogs
assets:cash $-12
expenses:food $12
hotdogs:store -6 hotdogs
hotdogs:pantry 6 hotdogs
2026-12-02 eat two
hotdogs:pantry -2 hotdogs
hotdogs:eaten 2 hotdogs
Or you could mix the two, tracking hot dogs and their money cost, converting between them as appropriate
(and using -B at report time for a money report):
2026-12-01 buy a pack of 6 hot dogs
assets:cash $-12
assets:pantry 6 hotdogs @ $2
2026-12-02 eat two
assets:pantry -2 hotdogs @ $2
expenses:food $4
which is equivalent to pure double entry bookkeeping entries like these:
2026-12-01 buy a pack of 6 hot dogs
assets:pantry 6 hotdogs
equity:conversion -6 hotdogs
equity:conversion $12
assets:cash $-12
2026-12-02 eat two
assets:pantry -2 hotdogs
equity:conversion 2 hotdogs
equity:conversion $-4
expenses:food $4
Summary:
* Expense at purchase: simplest, with one entry and nothing to track afterwards.
* Prepaid asset: your books show what the uneaten food cost, and each hot dog becomes an expense when you actually eat it.
* Spoilage: waste shows up separately, instead of looking like you ate it.
* Parallel inventory: you know how many you have, and where, without complicating the money accounts.
* Mixed: one set of accounts answers both "how many?" and "what are they worth?". A money-only report needs a report flag.
* Conversion postings: conventional entry which any accounting system understands, and the accounting equation stays balanced. A money-only report needs report flags.
I average about one new payee or MCC a month. Mostly it's stuff that goes to expenses:COGS, so it's not a heavy lift. This year I got to add both taxidermy suppliers and swimming pool suppliers, though I'm neither a taxidermist nor do I own or service pools as part of my business.
I default my expenses into expenses:UNKNOWN and have a balance assertion for the end of the year that that account is zero to ensure that I'm categorizing everything. Payees that I can't categorize by the vendor name or MCC, I skip and handle manually. Amazon, for instance, could be literally almost any expense category.
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.
> 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.
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:
(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.
Thank you tons for hledger. It's been an absolute game-changer for me. I'll have my financial statements for my business ready for our accountant this year before we get our W-2's.
I see. For now, I'd use github actions, or a vm manager like UTM. We usually don't need to generate other-platform binaries as often as local builds. Certainly, it's not as easy as with Go or Zig, but I do it all the time.
reply