A User's view of Hledger

Learning about hledger

hledger and travel expenses

Why an item purchased during travel wasn’t a travel expense

A recent column — one of my classic reposts — told of what I learned from my first recorded transaction. The basic idea was to have a “travel” category for all the things purchased when traveling. This is for all the travel-related expenses, such as gas, meals out, and museum admissions.

The travel category has worked well for me. However, I thought it would be useful to show an example of an exception.

During my most recent trip, my wife’s pocketbook strap broke. I cobbled together a temporary repair using a paperclip. The emphasis here should be on “temporary” repair. Also, it wasn’t a thing of either beauty or engineering. Therefore, I encouraged her to buy a replacement pocketbook. She did, and I recorded the expense as one of our regular household expenses rather than a trip expense. The reason was that the expense wasn’t directly related to travel. Rather, it was incidental to travel. The pocketbook would have broken whether or not we had been traveling. Also, the pocketbook will be used for years after the trip, so 99% of the value of the new pocketbook will be related to daily living around home rather than travel. That’s why, for my purposes, it wasn’t a travel expense.

Checking on large expenses by sorting by amount

During the trip, I wanted to see what our travel expenses were from the beginning of the year, but sorted by amount. This way I could see the largest expenses grouped together. The –sort=amount is the way to do that in hledger. This is it looks in a command:

hledger reg expenses:travel: -b1-1 --sort=amount

Upgrading hledger to 1.43.1

Finally, during the trip I had seen that there was a new version of hledger. I hesitated to upgrade on the trip. My time was limited, and I didn’t want to run into a problem that might take significant time to resolve, so I put it off until after my return. Once back at home, I did the upgrade — without issues — and I now have version 1.43.1.