In part 2, I look at an example from pig raising and note how a similar approach could be used for hledger to measure if a membership program is paying for itself. Read about it at https://hledgerfan.com/does-a-membership-plan-pay-for-itself-part-2/
My first idea was that the cost of the membership plan could be treated as a loan to the store in question. Any calculated savings would be applied as a repayment of the loan.
Actually, it should be the opposite.
I'd do something like this:
2025-01-01 ABC Mart | Membership
assets:membership 100. USD
assets:cash -100. USD
2025-01-02 ABC Mart
expenses:groceries 150. USD
assets:cash -145. USD
assets:membership -5. USD
; When total discounts you got from the membership exceeds 100. USD...
2025-10-30 ABC Mart
expenses:groceries 150. USD
assets:cash -145. USD
income:membership -5. USD
; If total discounts you got from the membership *did not* exceed 100. USD, at the end of the year...
2025-12-31 ABC Mart
expenses:membership loss -50. USD
assets:membership 50. USD
This is pretty much how a membership should work. It's just another intangible asset.
Of course, one crucial part about accounting is to draw the line.
Properly speaking, if the costs in particular information exceed the benefit they can acquire, companies may choose not to disclose this particular information.[11] For example, if there is a $0.1 difference between checkbook register and bank statement, accountant should ignore the $0.1 rather than waste time and money to find the $0.1.[12]
Many thanks for your input on this!
Also, I totally agree with the point about drawing the line. That is, it's most likely much more work than it's worth financially to track all your membership programs in double entry accounting.
In terms of non-financial benefits, I get to learn more about how hledger works, not only for what I learn on my own, but from ideas such as the one you presented.
Also, perhaps some of my calculations and conclusions will be useful in a general way to others, as they can glean something from my experience without having to do the work themselves.
Again, I thank you for sharing!