When a transaction posts to two commodities without specifying the conversion price, we generate a price which makes it balance (cf http://hledger.org/manual.html#prices). Until now, these generated prices were always shown with full precision (all available decimal digits) so that a manual calculation with the displayed numbers would agree. If there's just one posting in the commodity being priced, we can use an exact total price and the precision is no problem. But if there are multiple postings in the commodity being priced, we must show the averaged unit price. This can be an irrational number, which with our current Decimal-based implementation would display an excessive 255 decimal digits. So in this case we now set the price's display precision to the sum of the (max) display precisions of the commodities involved. An example: hledgerdev -f- print <<< 1/1 c C 10.00 c C 11.00 d D -320.00 >>> 2015/01/01 c C 10.00 @ D 15.2381 c C 11.00 @ D 15.2381 d D -320.00 >>>=0 There might still be cases where this will show more price decimal places than necessary. For now, YAGNI. |
||
|---|---|---|
| bin | ||
| checks | ||
| data | ||
| doc | ||
| extra | ||
| hledger | ||
| hledger-lib | ||
| hledger-web | ||
| tests | ||
| tools | ||
| .gitignore | ||
| .version | ||
| buildSandbox.sh | ||
| help-system.mk | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| sandbox.mk | ||
hledger
lightweight, portable, dependable accounting tools
hledger is a computer program for easily tracking money, time, or other commodities, on unix, mac and windows (and web-capable mobile devices, to some extent).
It is first a command-line tool, but there is also a web interface and a Haskell library (http://hackage.haskell.org/package/hledger-lib) for building your own programs and scripts (hledger is written in Haskell). hledger was inspired by and is largely compatible with Ledger. hledger is free software available under the GNU General Public License v3+.
hledger aims to help both computer experts and regular folks to gain clarity and control in their finances and time management, but currently it is a bit more suited to techies. I use it every day to:
- track spending and income
- see time reports by day/week/month/project
- get accurate numbers for client billing and tax filing
- track invoices
Though limited in features, hledger is lightweight, usable and reliable. For some, it is a simpler, less distracting, more future-proof alternative to Quicken or GnuCash.
For more, see http://hledger.org.