hledger: track if BahnCard was worth it
In November 2021 I got offered a 30€ discount on the BahnCard25 from the Deutsche Bahn AG. Some time ago I cancelled my BahnCard because I wasn't using it enough to justify having one. With a 30€ discount I should have no problem getting the remaining 25.70€ of value back.
But I wanted to track this. I am using hledger to track all my expenses and assets.
The ledger statement for the Bahncard looks like this:
2021-11-24 BahnCard 25 Expenses:misc:Bahncard €25.7 Assets:Checking Account (worthIt:Bahncard2022) €55.7 ; full price (worthIt:Bahncard2022) €-30 ; discount
And one statement of the travels looks like this:
2022-01-04 Travel S->KA Expenses:Travel:Deutsche Bahn €10.65 Assets:Checking Account (worthIt:Bahncard2022) €-3.55
Result of my current balance:
hledger reg ^worthIt:Bahncard2022
Date |
Description |
Account |
Amount |
Balance |
---|---|---|---|---|
2021-11-24 |
BahnCard 25 |
(worthIt:Bahncard2022) |
€55.70 |
€55.70 |
(worthIt:Bahncard2022) |
€-30.00 |
€25.70 |
||
2022-01-04 |
Travel S->KA |
(worthIt:Bahncard2022) |
€-3.55 |
€22.15 |
2022-01-04 |
Travel KA->S |
(worthIt:Bahncard2022) |
€-3.55 |
€18.60 |
2022-01-06 |
Travel S->KA |
(worthIt:Bahncard2022) |
€-3.55 |
€15.05 |
2022-01-06 |
Travel KA->S |
(worthIt:Bahncard2022) |
€-3.55 |
€11.50 |