hledger/hledger-lib/Hledger
g. nicholas d'andrea e678e09704 feat: accounts: add Gain (G) account type as subtype of Revenue [#2522]
Add a new account type Gain with single-letter code G as a subtype of
Revenue, similar to how Cash is a subtype of Asset and Conversion is a
subtype of Equity. This enables tracking capital gains/losses separately
while still including them in income statements and close --retain.

Usage: account revenues:capital  ; type: G

- type:G matches only Gain accounts
- type:R matches both Revenue and Gain (subtype matching)
- Auto-detection from account names matching:
  ^(income|revenue)s?:(capital[- ]?)?(gains?|loss(es)?)(:|$)
  e.g. income:gains, revenue:capital-gains, income:losses
2026-01-08 19:18:13 -10:00
..
Data feat: accounts: add Gain (G) account type as subtype of Revenue [#2522] 2026-01-08 19:18:13 -10:00
Read feat: accounts: add Gain (G) account type as subtype of Revenue [#2522] 2026-01-08 19:18:13 -10:00
Reports fix:PeriodData: simplify, use Day keys [#2479] 2025-10-11 11:27:58 -10:00
Utils imp: -f now errors if given a glob matching no files, like LEDGER_FILE 2026-01-06 21:39:59 -10:00
Write dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Data.hs dev!: lib: Refactor splitSpan to return Maybe DayPartition. 2025-10-09 15:31:28 -10:00
Query.hs feat: accounts: add Gain (G) account type as subtype of Revenue [#2522] 2026-01-08 19:18:13 -10:00
Read.hs imp:add,import: also create directories when autocreating journal file 2026-01-06 21:39:59 -10:00
Reports.hs cln: tests: Remove test and tests, which are just aliases for testCase 2021-08-30 16:32:19 -10:00
Utils.hs dev!: lib: Refactor splitSpan to return Maybe DayPartition. 2025-10-09 15:31:28 -10:00