Simon Michael
3c889cb565
imp: lib: dlog
2021-11-20 07:49:41 -10:00
Simon Michael
cf15dbd7c9
;doc: update manuals
2021-11-18 22:26:10 -10:00
Lawrence
fb817ffa55
imp: journal: support decimal-mark directive in journal files
...
To match csv-rule and override amount-style as described in
https://github.com/simonmichael/hledger/issues/1670
2021-11-18 22:17:07 -10:00
Stephen Morgan
d82416b7b9
imp: balance: Add single-line display with elision back in, this time
...
with a separate option --layout=wide,WIDTH.
2021-11-18 21:26:02 -10:00
Stephen Morgan
7e21f05a83
imp: balance: Implement multi-line display for multicommodity balance reports.
...
This allows more control over how multicommodity amounts are displayed.
In addition to the default single-line display, and the recent commodity
column display, we now have multi-line display. This is controlled by
the --layout option, which has possible values "wide", "tall", and
"bare". The --commodity-column option has been hidden, but is equivalent
to --layout=bare.
squash
2021-11-18 21:26:02 -10:00
Stephen Morgan
1c90c7f97a
fix: prices: Do not include zero amounts when calculating amounts for balance assignments. ( #1736 )
...
This is not usually a problem, but can get in the way of auto-inferring prices.
2021-11-18 20:59:52 -10:00
Stephen Morgan
e35d0b7865
fix: csv: Successfully parse empty csv file. ( #1183 )
2021-11-18 20:50:02 -10:00
Stephen Morgan
87a7a586d4
fix: csv: Handle multiple zero amounts in postings in csv files. ( #1733 )
2021-11-18 20:48:55 -10:00
Stephen Morgan
c6beb581a1
pkg: Use maximumBound instead of maximumDef to avoid deprecation
...
warnings in safe-0.3.18.
2021-11-14 21:49:58 -10:00
Stephen Morgan
8d161ebe32
cln: Silence build warning due to redundant import.
2021-11-11 19:42:06 -10:00
Stephen Morgan
ff0132df28
dev: Use realLength from doclayout instead of strWidth and textWidth. ( #895 )
...
This gives us more accurate string length calculations. In particular,
it handles emoji and other scripts properly.
2021-11-11 18:29:50 -10:00
Stephen Morgan
38e311211d
lib!: Semigroup instance of PeriodicReportRow and PeriodicReport now
...
preserves first prrName, rather than the second.
Previously the second name would be taken, ignoring the first.
2021-11-07 07:56:08 -10:00
Stephen Morgan
1116846881
lib: Add Bifunctor instances for PeriodicReport and PeriodicReportRow.
2021-11-07 07:56:08 -10:00
Stephen Morgan
7597e525a3
fix: balance: Balance reports should consider date: queries when calculating
...
report span with --date2. (#1745 )
2021-11-06 08:51:53 -10:00
Simon Michael
41bde20095
timedot: a D default commodity (and style) is applied to timedot aounts
...
This means they can be priced and converted.
2021-11-05 23:34:46 -10:00
Simon Michael
f00e5c25ec
cln: fix warning
2021-11-05 23:32:47 -10:00
Stephen Morgan
1bc04685b7
pkg: Drop base-compat-batteries dependency.
...
Our supported stackage versions are now new enough that we don't need
any of the compatibility features anymore.
2021-10-31 07:56:07 -10:00
Stephen Morgan
c90e7dbc8d
cln: Move posting rendering functions into Hledger.Data.Posting.
...
Replace showPosting with a wrapper around postingAsLines.
The functions textConcat(Top|Bottom)Padded are no longer used anywhere
in the code base, and can be removed if desired.
This produces slightly different output for showPosting, in particular
it no longer displays the transaction date. However, this has been
marked as ‘for debugging only’ for a while, and is only used in
hledger-check-fancy assertions. The output there is still acceptable.
2021-10-31 07:50:50 -10:00
Simon Michael
e4263e69e1
areg: begin respecting --date2: show txns' date2 ( #1731 )
2021-10-10 10:34:45 -10:00
Simon Michael
b4c1188c26
ref!: postingDateOrDate2, transactionDateOrDate2, whichDateFromOpts -> whichDate ( #1731 )
2021-10-10 10:34:35 -10:00
Simon Michael
7af2e79465
;cabal: update cabal files
2021-10-03 22:56:02 -10:00
Simon Michael
69905dbc25
;pkg: allow megaparsec 9.2
2021-10-03 22:55:10 -10:00
Stephen Morgan
5aadcdea4d
ref: Add new helper functions journalValueAndFilterPostings(With)?.
...
Combining valuation with filtration is subtle and error-prone (see e.g. #1625 ).
We have to do in in both MultiBalanceReport and PostingsReport, where it
is done in slightly different ways. This refactors this functionality
into separate functions which are called in both reports, for uniform
behaviour.
2021-09-26 08:13:12 -10:00
Simon Michael
b857307f64
;cabal: update cabal files
2021-09-24 12:22:15 -10:00
Simon Michael
8934c115bd
;pkg: bump version to 1.23.99
2021-09-24 12:22:15 -10:00
Stephen Morgan
ce4fcfae84
imp!: value: For register reports with no reporting interval and
...
--value=end, historical reports should be valued at journal/report end
date.
2021-09-24 11:32:41 -10:00
Simon Michael
e90fa3ee81
doc: changelogs: cleanup, finalise
2021-09-21 17:15:39 -10:00
Simon Michael
72a4c82043
cli: tweak --pretty help
2021-09-21 17:15:39 -10:00
Simon Michael
1b020e004b
;cabal: update cabal files
2021-09-21 15:34:23 -10:00
Simon Michael
19950df745
;pkg: bump version to 1.23
2021-09-21 15:34:23 -10:00
Stephen Morgan
afdeb404b0
fix: colour: NO_COLOR flag no longer overrides an explicit --color option. ( #1710 )
...
http://no-color.org/ specifies that command line arguments should
override a NO_COLOR flag.
2021-09-21 15:32:53 -10:00
Stephen Morgan
399d28dc05
cln: Display friendly error message if --pretty is given an incorrect
...
argument.
2021-09-21 15:32:09 -10:00
Stephen Morgan
bf3e82f780
imp: pretty: Replace --pretty-tables argument with --pretty=WHEN
...
argument, which takes yes or no. Default is no for now.
2021-09-21 14:53:52 -10:00
Simon Michael
bb4f2ff34f
;doc: update changelogs
2021-09-20 17:58:29 -10:00
Stephen Morgan
378df77001
cln: Remove unnecessary normaliseMixedAmount(SquashPricesForDisplay)? functions.
2021-09-20 14:49:34 -10:00
Arjen Langebaerd
c0fd79a40e
fix: extend application of commodity style to prices (except precision) and make --commodity-style a general flag
2021-09-20 08:55:55 -10:00
Stephen Morgan
4cfd3cb590
lib!: Remove GenericSourcePos, and replace it with either SourcePos or
...
(SourcePos, SourcePos).
This has been marked for possible removal for a while. We are keeping
strictly more information. Possible edge cases arise with Timeclock and
CsvReader, but I think these are covered.
The particular motivation for getting rid of this is that
GenericSourcePos is creating some awkward import considerations for
little gain. Removing this enables some flattening of the module
dependency tree.
2021-09-20 08:38:33 -10:00
Stephen Morgan
df71d2ddd5
dev: Move journal and text parsing utilities into more appropriate places, to reduce reliance on Hledger.Read.Common.
2021-09-19 17:10:38 -10:00
Stephen Morgan
1e766e481e
cln: Flatten dependency tree by removing dependencies of Hledger.Reports
...
on Hledger.Read.
This is done by using equivalent functions/types defined elsewhere
instead.
2021-09-19 17:10:38 -10:00
Stephen Morgan
315e92c08b
pkg!: Break functions related to balancing out into a separate module,
...
Hledger.Data.Balancing.
Both Hledger.Data.Transaction and Hledger.Data.Journal are massive
module with many things in them. Placing the balancing functions, which
are conceptually related, into a separate module helps keep things more
modular.
It also reduces the risk of import cycles, as right now balancing
functions cannot depend on any functions defined outside of
Hledger.Data.Transaction or Hledger.Data.Journal, respectively, if those
modules require basic transaction or journal functions.
2021-09-19 17:10:38 -10:00
Stephen Morgan
d55ce4d759
ref: performance: Use a Set in accountNamesFromPostings, instead of
...
nubSort.
This has better performance when there is repetition in the account
names.
2021-09-18 16:00:55 -10:00
Stephen Morgan
ab5350e02c
ref: performance: Improve performance for some high-use functions.
...
mixedAmount(Looks|Is)Zero now operate directly on the MixedAmount,
rather than converting them to a list of amounts first.
mixedAmountCost no longer reconstructs the entire MixedAmount when there
are amounts with no cost.
transactionCheckBalanced only checks if signs are okay if sums are not
okay. It also only traverses the list of postings once when picking real
and balanced virtual postings.
2021-09-18 16:00:55 -10:00
Stephen Morgan
a2d7ac5318
ref: balance: Refactor getPostingsByColumn to use groupByDateSpan.
...
This reduces code duplication, makes the code more idiomatic, and hides
optimisation magic within groupByDateSpan.
2021-09-18 14:40:28 -10:00
Stephen Morgan
35c33f342b
cln: Move column grouping functions form Report.PostingsReport to Data.Dates.
2021-09-18 14:40:28 -10:00
Malte Brandy
e31eb58ada
lib: Allow multiline comments in csv rules
2021-09-18 12:43:49 -10:00
Simon Michael
326d6e8dae
ref: ReportOptions{infer_value_} renamed to infer_prices_
...
For more consistency with the flag name (--infer-market-prices).
And BalancingOpts{infer_prices_} is now infer_transaction_prices_.
2021-09-18 12:12:31 -10:00
Simon Michael
daa9fddec9
imp: cli: --infer-market-price renamed to --infer-market-prices
...
It was too easy to get this wrong, even some of the docs did.
Now either plural or singular spelling works
(since we accept flag prefixes).
2021-09-18 12:12:31 -10:00
Stephen Morgan
9f5b652b4e
cln: Clean up miscellaneous functions in Hledger.Data.Amount.
...
This makes imports more explicit, removes printf, and adds stack traces
to unimplemented calls to Num instances for mixed amounts.
2021-09-18 11:41:53 -10:00
Stephen Morgan
020dd15be4
ref: Simplify parsing of commodity-style option.
2021-09-18 11:41:53 -10:00
Stephen Morgan
6b400194e3
cln: Add explicit export list for Hledger.Data.Account.
...
All modules in hledger-lib now have explicit export lists, with the
exception of Hledger.Data.Types.
2021-09-18 11:41:53 -10:00