Stephen Morgan
935abd1842
lib: Use .. in place of ,, for date ranges in compound balance reports.
2020-06-04 19:30:42 -07:00
Simon Michael
d1f62f0f2e
print, reg, balcmds: show json output pretty-printed
2020-06-04 15:13:28 -07:00
Dmitry Astapov
b7413edf22
lib: --forecast=PERIODICEXPR. Fixes #835 , #1236
2020-06-03 15:53:00 -07:00
Simon Michael
97f2235bca
;lib: refactor amount cost functions
...
Rename costOfAmount -> amountCost, costOfMixedAmount -> mixedAmountCost,
drop amountToCost, mixedAmountToCost.
2020-05-31 15:48:08 -07:00
Simon Michael
660ba7e1d9
lib: clarify zero-checking function names
...
isZeroAmount -> amountLooksZero
isReallyZeroAmount -> amountIsZero
isZeroMixedAmount -> mixedAmountLooksZero
isReallyZeroMixedAmount -> mixedAmountIsZero
isReallyZeroMixedAmountCost dropped
2020-05-29 18:57:22 -07:00
Dmitry Astapov
54300328cd
cli: ability to pass arguments to getHledgerCliOpts + two example scripts
2020-05-27 04:58:57 -07:00
Dmitry Astapov
cbacef21eb
lib: multiBalanceReport derives query from ReportOpts
2020-05-25 15:50:14 -07:00
Simon Michael
61bec588d2
print,reg,balcmds: list output formats accurately in --help ( #689 )
...
Also:
- tweak the unsupported output format message
- Hledger.Cli.CliOptions no longer exports outputflags
2020-05-23 13:54:41 -07:00
Simon Michael
5f1a864c20
print,reg,balcmds: fix JSON output, which wasn't JSON ( #689 )
2020-05-23 13:30:22 -07:00
Simon Michael
a016a43785
cli: fix hiding of redundant source scripts when a .com/.exe exists
...
Related to #1225 .
2020-04-15 11:33:38 -07:00
Simon Michael
1a606870ca
;regen docs
2020-03-19 16:05:52 -07:00
Simon Michael
35ba2e4e9e
;bal: doc: recommend using the same commodity for budget goals
2020-03-19 16:03:58 -07:00
Stephen Morgan
702c958487
lib: Replace some utility functions with library functions.
2020-03-02 12:45:30 -08:00
Simon Michael
061bf73b61
;doc: regen manuals
...
[ci skip]
2020-03-01 17:29:01 -08:00
Simon Michael
2c8a6e988f
lib: Hledger.Read.CsvReader cleanup
...
Exports added: CsvRecord, CsvValue, csvFileFor
Exports removed: expandIncludes, parseAndValidateCsvRules, transactionFromCsvRecord
2020-02-27 23:37:32 -08:00
Simon Michael
2a5f7819af
bs,cf,is,bal,print,reg: support json output format
2020-02-24 17:49:53 -08:00
Simon Michael
bc9bdf8108
;print: refactor, drop unneeded ropts tweak
2020-02-24 17:49:53 -08:00
Simon Michael
7f16d23898
;refactor: extract --value=then error message
2020-02-24 17:49:53 -08:00
Simon Michael
8b520b5c3e
bs,cf,is,bal,print,reg: reject invalid output formats
2020-02-24 17:49:45 -08:00
Simon Michael
7ec25da13a
web: edit/upload: normalise line endings, avoiding parse errors ( #1194 )
...
Renamed: writeValidJournal -> writeJournalTextIfValidAndChanged
Added comments clarifying line ending behaviour of:
add, import, appendToJournalFileOrStdout, readFilePortably,
writeFileWithBackupIfChanged, writeJournalTextIfValidAndChanged
Summary of current behaviour:
- hledger add and import commands will append with (at least some)
unix line endings, possibly causing the file to have mixed line
endings
- hledger-web edit and upload forms will write the file with
the current system's native line endings, ie changing all
line endings if the file previously used foreign line endings.
2020-02-24 14:04:44 -08:00
Simon Michael
696ec4998b
;doc: regen help/manuals
...
[ci skip]
2020-02-22 11:40:41 -08:00
Simon Michael
b9b5702946
;doc: add hledger-ui note to --forecast help ( #1193 )
...
[ci skip]
2020-02-22 11:40:41 -08:00
Simon Michael
e8e1566083
;bal: doc: document --transpose; remove obsolete limitation note
...
[ci skip]
2020-02-20 10:02:02 -08:00
Simon Michael
bd0753101e
bs, cf, is: in csv output, subreport headings had two excess columns
2020-02-12 10:48:04 -08:00
Simon Michael
dad4d9b662
print: be sure to value all postings; -V/-X/--value now imply -x
...
Previously -B implied -x; now any of the valuation flags do.
This avoids a bug where print -V of a transaction with an implicit
commodity conversion would convert only some of its postings to value.
Also, more valuation tests.
2020-02-10 12:41:36 -08:00
Simon Michael
aa96b41efe
print, register: add --value=then, valuing at each posting's date
...
Currently this will give an error with other kinds of report.
2020-02-10 08:20:39 -08:00
Simon Michael
fd64d7bb3a
;doc: regen manuals
...
[ci skip]
2020-02-07 10:45:57 -08:00
Simon Michael
659a034393
;doc: makde some comments less like markdown headings
...
[ci skip]
2020-02-05 19:32:38 -08:00
Simon Michael
6830139b70
;checkdupes: help: fix link
2020-01-28 09:20:42 -08:00
Simon Michael
f1f32e8341
;close: doc: cleanups, remove dangerous >> example ( #1165 )
...
[ci skip]
2020-01-22 15:32:36 -08:00
Simon Michael
b4ced3188e
;doc: regen manuals
...
[ci skip]
2020-01-22 15:22:56 -08:00
Simon Michael
5ba3cc6f42
close: regularise the --open*/--close* flags for memorability ( #1165 )
...
--closing -> --close
--opening -> --open
--close-to -> --close-acct
--open-from -> --open-acct
The old flags are still accepted for backward compatibility, but are
not shown in --help or docs, to conserve screen and brain space.
2020-01-22 15:19:24 -08:00
Simon Michael
cda8909aae
close: don't repeat the description by default ( #1165 )
...
You'll almost certainly want the opening/closing descriptions to be
different, for filtering, so making --close-desc and --open-desc fully
independent is a better default.
And more doc cleanups.
2020-01-22 15:04:05 -08:00
Simon Michael
ceedcb1a18
;doc: regen manuals
...
[ci skip]
2020-01-22 14:50:21 -08:00
Simon Michael
458de89aae
;close: doc tweaks
...
[ci skip]
2020-01-22 14:42:01 -08:00
Simon Michael
f14ae7df3a
;doc: regen manuals
...
[ci skip]
2020-01-22 14:41:08 -08:00
Simon Michael
72d0190d1d
;close: doc tweaks
...
[ci skip]
2020-01-22 14:40:20 -08:00
Simon Michael
d93c69146d
;doc: regen manuals
...
[ci skip]
2020-01-22 14:30:50 -08:00
Simon Michael
f1110d163d
close: --close-desc/--open-desc customise the descriptions ( #1165 )
2020-01-22 14:30:12 -08:00
Simon Michael
4bb840a0f3
close: use the same default equity account for both ( #1165 )
...
And some doc cleanups.
"equity:opening/closing balances" is now the default account for both.
2020-01-22 14:29:31 -08:00
Simon Michael
9710c86c7f
;doc: regen manuals
...
[ci skip]
2020-01-22 12:52:41 -08:00
Simon Michael
7500002ee5
close: hide equity amounts by default, for simpler entries ( #1165 )
...
-x/--explicit shows them, as with print.
2020-01-22 12:52:16 -08:00
Simon Michael
2645b76ff0
close: hide prices by default, show them with --show-costs ( #1165 )
...
close no longer preserves costs, generating huge entries when there
are many foreign currency/investment transactions, unless you ask it to.
2020-01-22 12:52:01 -08:00
Simon Michael
dee9c0f150
;close: --close-to also sets --open-from and vice versa ( #1165 )
2020-01-22 08:52:20 -08:00
Simon Michael
aa8c18fcc8
;close: refactor ( #1165 )
2020-01-22 08:34:13 -08:00
Simon Michael
42840dd4c2
;close: dedent ( #1165 )
2020-01-22 08:27:01 -08:00
Simon Michael
98b90a8a7b
;close: cleanups ( #1165 )
2020-01-22 08:26:59 -08:00
Simon Michael
090f65ec83
;doc: regen manuals
...
[ci skip]
2020-01-20 18:02:42 -08:00
Simon Michael
69bc8f803b
close: fix some inappropriate rounding, ensure the txn balances ( #1164 )
2020-01-20 18:01:33 -08:00
Simon Michael
1e9f30bafc
close: add the --interleaved flag; refactor a little
...
Interleaved equity postings make troubleshooting easier.
2020-01-20 18:01:29 -08:00
Simon Michael
9bd7a713f9
;print: expand -x doc, mention that it also shows prices
...
[ci skip]
2020-01-20 12:58:47 -08:00
Brian Wignall
24026d629a
Change "showEndDates" formatting to yyyy-mm-dd in CompoundBalanceCommand
2020-01-07 15:58:54 -08:00
Brian Wignall
00eb0b3c8f
Make "stack test" pass again
2020-01-07 15:58:22 -08:00
Brian Wignall
35481a665b
Change Date output to yyyy-mm-dd
2020-01-07 15:58:22 -08:00
Aleksandar Dimitrov
8df4e1ed83
Remove --separator command line argument
2020-01-05 14:45:57 -08:00
Simon Michael
4a7a700d93
;doc: fix flags marker appearing in manuals
...
$FLAGS$ didn't work (nor =FLAGS=); _FLAGS it is..
[ci skip]
2020-01-05 07:41:01 -08:00
Simon Michael
c186eb6084
;doc: change flags marker in command helps to suit latest pandoc
...
From _FLAGS_ to $FLAGS$, since latest pandoc strips the underscores
at a certain point in our docs rendering.
2020-01-04 21:17:51 -08:00
Stephen Morgan
228edf6ba6
Don't store leaf name in PeriodReport.
...
Calculate at the point of consumption instead.
2020-01-04 21:15:42 -08:00
Stephen Morgan
8882b6fc85
cli: Use PeriodicReport.
2020-01-04 17:23:17 -08:00
Stephen Morgan
74778efcf5
Use nubSort instead of nub . sort.
2020-01-04 08:31:10 -08:00
Brian Wignall
2852f9dbee
Fix typos
2019-12-21 12:09:05 -08:00
Gaith Hallak
9b6652b93f
Update the instructions for the add command
2019-12-18 23:24:10 +03:00
Gaith Hallak
e1bbefbd1b
Remember the previously entered values when stepping forward
2019-12-18 23:14:43 +03:00
Gaith Hallak
ee18227a12
Show the previous input in the input area after the back command
2019-12-18 19:53:45 +03:00
Gaith Hallak
6f26eef832
Change the '<' command to go back one step during addition
2019-12-18 00:38:29 +03:00
Simon Michael
5a19d604b6
; sort commands list
2019-12-16 16:32:26 -08:00
Simon Michael
47567cd770
;fix some warnings with GHC 8.10 alpha
...
hledger is GHC 8.10 ready!
2019-12-14 17:30:19 -08:00
Simon Michael
95aa2e16cc
;doc: fix some old wiki and Cookbook references (hledger_site/#10)
2019-12-09 06:08:03 -08:00
Simon Michael
13e6c7dfdf
lib: drop "assertion" alias for nullassertion
...
Perhaps we'll stick with the null* convention. Fixes a warning in Transaction.hs.
2019-12-09 06:08:03 -08:00
Simon Michael
9d6db33278
close: doc: mention --close-to/--open-from in the manual
...
[ci skip]
2019-12-06 12:27:07 -08:00
Simon Michael
a0b92e02b9
Revert "remove old fail compatibility imports that are obsolete ?"
...
They are needed with ghc <8.4, not for fail but for <> I think.
Try cleaning up again another time.
This reverts commit 318ce7eb07 .
2019-12-01 11:32:51 -08:00
Simon Michael
318ce7eb07
remove old fail compatibility imports that are obsolete ?
2019-12-01 08:31:50 -08:00
Simon Michael
5b6dbe86b3
close: don't strip decimal zeros, causing misparsing ( fix #1137 )
2019-11-30 16:58:54 -08:00
Simon Michael
c7574b8005
;lib, cli: test suite cleanups, don't run hledger-lib tests twice
2019-11-29 06:11:25 -08:00
Simon Michael
2b2a0b3cf8
;tests: use "test" alias for testCase everywhere
...
Easier to type and read, and a little clearer to my eyes;
"testCase" implies a single case, but it can contain many assertions.
2019-11-28 15:33:33 -08:00
Simon Michael
5dac8af2ef
;ui: fix build error due to tests rewrite
2019-11-27 21:54:31 -08:00
Simon Michael
4ab5896902
close: add --close-to, --open-from to choose account names
2019-11-27 14:19:44 -08:00
Simon Michael
91a3b03359
;test: update command line help
2019-11-27 13:17:34 -08:00
Simon Michael
b36f6df110
tests: port all unit tests to tasty, second pass ( #1090 )
...
Hledger.Util.Tests helpers have been cleaned up, and test names are
now shown.
Tests have been cleaned up a bit. Some groups of unnamed tests have
been collapsed into a single named test containing a sequence of
assertions. The test command counts named tests, not assertions, so
the reported unit test count has dropped from 199 to 188.
2019-11-27 13:17:34 -08:00
Simon Michael
13a3542464
tests: port all unit tests to tasty, first cut ( #1090 )
...
easytest is not actively maintained and requires an old version of
hedgehog which does not support base-compat 0.11 & ghc 8.8.
This is still using the old easytest helpers, and not displaying test
names properly.
2019-11-27 12:43:43 -08:00
Amitai Burstein
e15adddeb8
Add exit status code to check-dates
2019-11-23 13:43:47 -08:00
Mykola Orliuk
6dbe925eed
cli: anonymize transaction code also
2019-11-18 17:42:22 -08:00
Mykola Orliuk
0a273561f7
cli: anonymize declared accounts also
...
Fixes simonmichael/hledger#901
2019-11-18 17:42:22 -08:00
Mykola Orliuk
5287fe671b
;all: hide RawOpts internals
...
This way we can ensure we always use only functions from RawOptions.
2019-11-18 17:38:39 -08:00
Mykola Orliuk
8991419c68
;all: drop dummy decodeRawOpts
2019-11-18 17:38:39 -08:00
Mykola Orliuk
31ae3d3aaf
;lib: drop SystemString left from GHC pre 7.2
...
We are relying on base-4.9 or newer. Thus we don't compile anymore with
GHC version lower than 8.0.1.
2019-11-18 17:38:39 -08:00
Simon Michael
68b1cacf0f
lib: refactor, prepare to drop showTransactionUnelided functionality
...
It seems we don't use it at all, and ony says it's not robust with
prices either.
Merge remote-tracking branch 'ony/chores/drop-elide-in-showTransaction'
2019-11-18 17:27:30 -08:00
Simon Michael
69ee21cf16
;doc: regen manuals
...
[ci skip]
2019-11-18 17:14:06 -08:00
Michael Kainer
79ca4a767e
cli: Add -% to compound balance commands
...
This commit introduces the commandline argument -%/--percent to show
percentages of the column's total instead of the absolute amounts for
each account in reports. The signs of the values are preserved.
This option is especially useful for the balance and incomestatement
commands.
If there are multiple commodities involved in a report hledger bails
with an error message. This can be avoided by using --cost. Also note
that if one uses -% with the balance command the chances are high that
all numbers are 0. This is due to the fact that by default balance sums
up to zero. If one wants to use -% in a meaningful way with balance one
has to add a query.
In order to keep the implementation as simple as possible --tree has no
influence over how the percentages are calculated, i.e., the percentages
always represent the fraction of the columns total. If one wants to know
the percentages relative to a parent account, one has to use a query to
narrow down the accounts.
2019-11-18 17:10:59 -08:00
Dmitry Astapov
87b82b6839
lib: roi does not fail on empty input data (+test)
2019-11-18 16:13:04 -08:00
Mykola Orliuk
ab9c150759
;lib: clean out showTransactionUnelided
...
Keep aliases until next major release.
2019-11-16 12:53:07 +01:00
Brian Wignall
0ce7e811ba
Fix two small typos
2019-11-10 13:54:48 -08:00
Simon Michael
445adbe9d1
;doc: regen manuals
...
[ci skip]
2019-10-23 12:30:27 -07:00
Simon Michael
cfc00070a1
;doc: fix output destination/format links in command docs
...
[ci skip]
2019-10-23 12:29:17 -07:00
Simon Michael
312e772468
prices: style price amounts; always show full precision
2019-10-20 07:09:34 -07:00
Mykola Orliuk
78146978f4
;lib: store raw opts unquoted
...
It looks like we only need quote when we build query and in some
messages.
Fixes simonmichael/hledger#1079
2019-10-19 14:44:08 -07:00
Simon Michael
9967ead4c5
;lib: let commodityStylesFromAmounts & co. return an error ( #793 , #1091 )
...
And if they did, the stats command would now throw an error.
Changed:
journalApplyCommodityStyles
journalInferCommodityStyles
commodityStylesFromAmounts
2019-09-27 15:09:39 -10:00
Simon Michael
a0deb88796
;doc: regen manuals
...
[ci skip]
2019-09-13 11:00:03 -07:00
Simon Michael
867ccb31d5
;import: drop inconsistent period
2019-09-13 09:07:18 -07:00
Simon Michael
bf1e398ffd
;import: with --dry-run the no txns case should be parseable too
2019-09-13 09:02:32 -07:00