This is an early preview of the WIP hledger 1.25, with binaries for easy installation by testers and early adopters. Your testing and feedback is appreciated and will make the final release better.
You can build this prerelease from tag 1.24.99.2, or try the CI binaries below. Download and unzip the appropriate zip file. Unix and mac users will need to chmod +x the binaries to make them executable. Mac users will need to mark them as trusted, eg right-click the file in Finder and option-click Open. WIndows users will need to do something similar. There is no hledger-ui binary for Windows.
Changes since 1.24
hledger 1.24.99.2 2022-02-05
Breaking changes
Journal format's
account NAME TYPECODEsyntax, deprecated in 1.13, has been dropped.
Please useaccount NAME ; type:TYPECODEinstead.
(Stephen Morgan)The rule for auto-detecting "cash" (liquid asset) accounts from account names
for thecashflowreport has been simplified.
If you have been using the cashflow report, without explicitly declaring Cash accounts,
you might notice a change, and might need to declare your Cash accounts explicitly
(by addingtype:Ctags to top-level cash account directives).
Features
The new
type:TYPECODESquery matches accounts by their accounting type.
Account types are declared with atype:tag in account directives,
or inferred from common english account names, or inherited from parent accounts,
as described at Declaring accounts > Account types.
This generalises the account type detection ofbalancesheet,incomestatementetc.,
so you can now select accounts by type without needing fragile account name regexps.
Also, theaccountscommand has a new--typesflag to show account types.
Eg:hledger bal type:AL # balance report showing assets and liabilities
hledger reg type:x # register of all expenses
hledger acc --types # list accounts and their types
(#1820, #1822) (Simon Michael, Stephen Morgan)
The
tag:query can now also match account tags, as defined in account directives.
Subaccounts inherit tags from their parents.
Accounts, postings and transactions can be filtered by account tag.
(#1817)The new
--infer-equityflag replaces the@/@@price notation in commodity
conversion transactions with more correct equity postings (when not using-B/--cost).
This makes these transactions fully balanced, and preserves the accounting equation.
For example:2000-01-01
a 1 AAA @@ 2 BBB b -2 BBB$ hledger print --infer-equity
2000-01-01a 1 AAA equity:conversion:AAA-BBB:AAA -1 AAA equity:conversion:AAA-BBB:BBB 2 BBB b -2 BBB
equity:conversion is the account used by default. To use a different account,
declare it with an account directive and the new V (Conversion) account type.
Eg:
account Equity:Trading ; type:V
(#1554) (Stephen Morgan, Simon Michael)
- Normalised, easy-to-process "tidy" CSV data can now be generated with
--layout tidy -O csv.
In tidy data, every variable is a column and each row represents a single data point
(cf https://vita.had.co.nz/papers/tidy-data.html).
(#1768, #1773, #1775) (Stephen Morgan)
Improvements
Strict mode (
-s/--strict) now also checks periodic transactions (--forecast)
and auto postings (--auto).
(#1810) (Stephen Morgan)hledger check commoditiesnow always accepts zero amounts which have no commodity symbol.
(#1767) (Stephen Morgan)Relative smart dates may now specify an arbitrary number of some period into the future or past).
Some examples:in 5 days
in -6 months
5 weeks ahead
2 quarters ago
(Stephen Morgan)
CSV output now always disables digit group marks (eg, thousands separators),
making it more machine readable by default.
(#1771) (Stephen Morgan)Error messages improved:
- Balance assignments
- aregister
- Command line parsing (less "user error")
- Balance assignments
Fixes
--layout=bareno longer shows a commodity symbol for zero amounts.
(#1789) (Stephen Morgan)balance --budgetno longer elides boring parents of unbudgeted accounts
if they have a budget.
(#1800) (Stephen Morgan)roinow reports TWR correctly- when there are several PnL changes occurring on a single day
- and also when investment is fully sold/withdrawn/discounted at the end of a particular reporting period.
- when there are several PnL changes occurring on a single day
(#1791) (Dmitry Astapov)
Documentation
There is a new CONVERSION & COST section, replacing COSTING. (#1554)
Some problematic interactions of account aliases with other features have been noted. (#1788)
hledger-ui 1.24.99.2 2022-02-05
- Use hledger 1.24.99.2
hledger-web 1.24.99.2 2022-02-05
- Use hledger 1.24.99.2
hledger-lib 1.24.99.2 2022-02-05
hledger-lib now builds with GHC 9.2 and latest deps. (#1774)
Journal has a new jaccounttypes map.
The journalAccountType lookup function makes it easy to check an account's type.
The journalTags and journalInheritedTags functions look up an account's tags.
Functions like journalFilterPostings and journalFilterTransactions,
and new matching functions matchesAccountExtra, matchesPostingExtra
and matchesTransactionExtra, use these to allow more powerful matching
that is aware of account types and tags.Journal has a new jdeclaredaccounttags field
for easy lookup of account tags.
Query.matchesTaggedAccount is a tag-aware version of matchesAccount.Costing has been changed to ConversionOp with three options:
NoConversionOp, ToCost, and InferEquity.
The first correspond to the previous NoCost and Cost options, while the
third corresponds to the --infer-equity flag. This converts transactions with costs
(one or more transaction prices) to transactions with equity:conversion postings.
It is in ConversionOp because converting to cost with -B/--cost and inferring conversion
equity postings with --infer-equity are mutually exclusive.
The cost_ record of ReportOpts has been changed to conversionop_.Renamed: CommodityLayout to Layout.
(Stephen Morgan)