hledger/hledger-lib/Hledger/Data
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
..
JournalChecks dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Account.hs fix:PeriodData: simplify, use Day keys [#2479] 2025-10-11 11:27:58 -10:00
AccountName.hs feat: accounts: add Gain (G) account type as subtype of Revenue [#2522] 2026-01-08 19:18:13 -10:00
Amount.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
BalanceData.hs !dev: lib: Allow Account to store date-indexed balances. 2025-06-04 23:10:00 -10:00
Balancing.hs dev: balanceTransaction -> balanceSingleTransaction 2025-11-18 09:39:16 -10:00
Currency.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Dates.hs dev!: lib: Refactor splitSpan to return Maybe DayPartition. 2025-10-09 15:31:28 -10:00
DayPartition.hs fix:PeriodData: simplify, use Day keys [#2479] 2025-10-11 11:27:58 -10:00
Errors.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Journal.hs imp:journal: fix a slight pessimisation of include directives 2025-12-10 19:21:59 -10:00
JournalChecks.hs fix:check accounts: don't garble non-ascii account names in errors [#2469] 2025-10-01 14:40:08 -10:00
Json.hs fix:PeriodData: simplify, use Day keys [#2479] 2025-10-11 11:27:58 -10:00
Ledger.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Period.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
PeriodData.hs fix:PeriodData: simplify, use Day keys [#2479] 2025-10-11 11:27:58 -10:00
PeriodicTransaction.hs dev!: lib: Refactor splitSpan to return Maybe DayPartition. 2025-10-09 15:31:28 -10:00
Posting.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
RawOptions.hs lib: add dropRawOpt, cliOptsDropArgs 2025-01-21 22:02:05 -10:00
StringFormat.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Timeclock.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Transaction.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
TransactionModifier.hs dev: switch all qualifed imports to ImportQualifiedPost style 2025-09-29 19:28:59 -10:00
Types.hs feat: accounts: add Gain (G) account type as subtype of Revenue [#2522] 2026-01-08 19:18:13 -10:00
Valuation.hs imp:lib:valuation: optimize price lookup with pre-built indexes [#2511] 2026-01-02 17:05:24 -10:00