Commit Graph

348 Commits

Author SHA1 Message Date
Simon Michael
e491f513a1 cli: tabular reports no longer have a trailing blank line added
Tabular reports from bal, bs etc. have until now been rendered on
the terminal with one final blank line, for readability.
This change drops the blank line.

This is consistent with the non-tabular balance and register output
(not print, which is a special case), and with most unix commands.
The real reason for it, which I admit is flimsy, is that I can now omit
the final delimiter (>=0) when using shelltestrunner 1.9's new format,
making functional tests easier to maintain and more readable.
If there's opposition, this could be reverted.
2018-01-23 12:47:56 -08:00
Simon Michael
e43c430a61 bal: clarify some todo tests, use shelltestrunner's format 3 2018-01-23 12:17:14 -08:00
Simon Michael
6c60e4a97b bs/cf/is: always show a tabular report, even with no report interval
Previously, if you specified no report interval, the text output of
these commands was a simple report like the original balance command,
with amounts on the left and account names on the right. Also,
balances used arithmetic sign like the balance command.
Now it always draws a table, with account names in the left
column, and shows balances with normal-positive sign, consistent with
the multicolumn reports. Less code, fewer bugs.
2018-01-23 11:05:01 -08:00
Simon Michael
c4b778bfb9 update report titles in func. tests 2018-01-22 07:58:01 -08:00
Simon Michael
6b349e3123 bs/bse/cf/is: show all balances as normally-positive (experimental)
Income, liability and equity balances, which until now we have
always displayed as negative numbers, are now shown as normally positive
by these reports.
Negative numbers now indicate a contra-balance (eg an overdrawn
checking account), a net loss, a negative net worth, etc.
This makes these reports more like conventional financial statements,
and easier to read and share with normal people.
2018-01-18 11:01:07 -08:00
Simon Michael
1234671c69 equity: rename to close 2018-01-03 17:02:35 -08:00
Simon Michael
31effcd731 equity: ignore any begin date; closed balances are historical 2018-01-03 13:50:16 -08:00
Simon Michael
2d66f8cf04 fix some 2017-isms in func. tests 2018-01-01 15:47:31 -08:00
Simon Michael
ecdbc05703 Merge branch 'feature/space-as-digits-sep' of https://github.com/ony/hledger into ony-feature/space-as-digits-sep 2017-12-30 09:29:22 -08:00
Simon Michael
8f55b6137d uses today's prices, not those of last txn date, for -V (fix #683,#648) 2017-12-29 21:42:59 -08:00
Dmitry Astapov
58c755df86 lib: fix budget display to always show %% consumed and handle costs
For multi-column balance report, if there are no transactions in the
given period for budgeted account, display [0% of <budget>] for
consistency.

If balance is a mix of commodities, convert to cost basis for the
purposes of computing percent of balance spent.
2017-12-01 15:52:29 -08:00
Mykola Orliuk
47766ea9d4 journal: support space as digits sep
Resolves simonmichael/hledger#330
2017-11-29 17:20:18 +01:00
Mykola Orliuk
e58272f28f journal: use groups sep and prec for decimal hint
Use whole AmountStyle in process of resolving decimal/groups separator
ambiguity.

Resolve simonmichael/hledger#399
2017-11-27 15:47:56 -08:00
Mykola Orliuk
7cbdeb40a4 journal: get decimal hint from default commodity
If appropriate commodity directive is missing fallback to default
commodity directive to get number representation style.
2017-11-27 15:47:56 -08:00
Mykola Orliuk
b7dbe044b0 journal: use decimal sep hint for amount parser
Make use of commodity format directive as a hint for parsing amount.

Kinda resolves simonmichael/hledger#487
2017-11-27 15:47:56 -08:00
Mykola Orliuk
bcf7a1add5 journal: make numbers parsing more strict
- Hunt down adjacent punctuations with altering char.
- Add some tests dedicated to parsing amounts.
2017-11-27 15:47:56 -08:00
Mykola Orliuk
53ad035b24 journal: limit scope of directives backtracking
Effectively improves error reporting for directives.

Resolves simonmichael/hledger#402
2017-11-27 14:32:48 -08:00
Dmitry Astapov
8cd58b71ab bal: show percentage of budget spent 2017-11-26 14:57:41 +00:00
Dmitry Astapov
6ea5da2d9d bal: --budget shows budget performance
Budget goals specified with periodic transactions (as with
hledger-budget) can now be displayed in balance report (but not in bs/is/cf).

--budget shows the target amount and percentage alongside the actual
amount, per account and period.

Unbudgeted accounts will be hidden, unless --show-unbudgeted is used.

Budgeted accounts are displayed folded (depth-clipped) at a depth
matching the budget specification. Unbudgeted accounts, if shown, are
displayed at their usual depth (in full detail, or according to --depth).
2017-11-26 14:57:41 +00:00
Dmitry Astapov
23f3da4e92 cli: --auto adds automated postings to reports
Ledger-style automated postings, previously supported only by
hledger-budget, have landed as a first-class feature.  The --auto
flag activates them, so that any postings they generate are
included in reports.
2017-11-26 14:57:41 +00:00
Dmitry Astapov
f101d5b515 cli: --forecast adds periodic transactions to reports
Ledger-style periodic transactions, previously supported only by
hledger-budget, have landed as a first-class feature.  The --forecast
flag activates them, so that any transactions they generate are
included in reports.
2017-11-26 14:57:41 +00:00
Simon Michael
4ab71f0d0a journal: clarify that txn/posting comments must start with semicolon 2017-11-01 08:04:25 -07:00
Mykola Orliuk
39d13d68ef test: equity/prices/rewrite now builtin
Fix shell-tests for add-ons that became built-in commands.
2017-10-28 07:14:48 -07:00
jeevcat
3a9ea65b99 Rewrite of BalanceAssertion type to track its source position.
Fixes #481.
2017-10-16 13:25:03 -07:00
Sam Jeeves
b7f8ca2cda Modified test to check for single line number of posting. 2017-10-14 15:11:19 -07:00
Simon Michael
80fefe9c43 cli: fix functional tests 2017-09-14 06:14:26 -07:00
Christian G. Warden
deaf9cfbef Exclude Fixed Assets from Cashflow Report
Add "fixed" to the regex used to exclude asset accounts from cashflow
reports.  Assumes accounts are set up something like:
assets:fixed assets:equipment
assets:fixed assets:vehicles
assets:fixed assets:buildings
2017-08-27 04:41:05 -07:00
Simon Michael
ce5724fee1 csv: switch the order of generated postings, so account1 is first
This is subjective, but simplifies things as we'll be adding more than
two postings. Free-form entry templates will allow custom orderings
in future.
2017-08-15 08:16:49 -07:00
Simon Michael
ea0aced89c lib: add test for an amount parsing issue
[ci skip]
2017-08-03 16:58:54 -07:00
Simon Michael
e53c3e6d8a bin: budget: update func tests 2017-07-31 08:15:29 -07:00
Simon Michael
b9571bd088 bal/bs/cf/is: consistently separate columns with a double space
Previously, amounts wider than the column headings would be separated
by only a single space. Also there was an extra space before the first
column.
2017-07-27 09:09:03 -07:00
Simon Michael
a25a8f868c bs/is: fix tests 2017-07-25 13:23:16 -07:00
Simon Michael
9d4d6ebc4d bs/cf/is: show one trailing blank line, not two 2017-07-25 12:43:56 -07:00
Simon Michael
11202c897a bs: merge pretty.test 2017-07-25 09:33:43 -07:00
Simon Michael
c89bec0e17 bs/is: don't let an empty subreport disable the grand totals (fixes #588) 2017-07-25 09:21:09 -07:00
Simon Michael
6e00247df3 rewrite: make test use compiled version like the others
That's the current most robust way. Otherwise, it can fail due to
stack's progress output as it reinstalls hledger libs, and that
reinstallation also forces all the addons to be relinked.
2017-07-07 02:14:29 +01:00
Simon Michael
38752565a9 csv: test stderr output more accurately 2017-07-06 14:10:54 +01:00
Simon Michael
28e8c76a8e csv: rename csv-read.test for easy file finding 2017-07-05 14:49:48 +01:00
Mykola Orliuk
15c86e1f79 prices: add inverted-costs support and sort output 2017-06-16 11:28:15 -07:00
Nikolay Orlyuk
8966e765c8 prices: improve precision 2017-06-16 11:28:15 -07:00
Simon Michael
e119941648 rename "uncleared" status to "unmarked" and --uncleared to --unmarked (#564)
See the issue and linked mail list discussion. Ambiguity between the
uncleared state, and the "not cleared" --uncleared flag causes confusion
and friction. At this point it seems best to break with Ledger and
past hledger, pick a new name and drop --uncleared to put an end to it.
2017-06-15 19:16:39 -07:00
Simon Michael
5d28120f6d lib: multiple status: query terms are OR'd (#564)
Like desc: and acct:. I think this is more intuitive and useful,
so now eg "status: status:!" works (equivalent to -UP or "not:status:*").
2017-06-15 19:16:39 -07:00
Simon Michael
7fc921db86 lib, cli: -U/-P/-C flags can be combined (#564) 2017-06-15 19:16:39 -07:00
Simon Michael
8b073014e4 lib, cli: -U/--uncleared no longer matches pending things (#564)
Also begin using "marked"/"unmarked" terminology where it's helpful.
2017-06-15 19:16:39 -07:00
Simon Michael
c5d63f03ce lib: clean up status functional tests, document ClearedStatus (#564) 2017-06-15 19:16:39 -07:00
Simon Michael
a14317db3c tests: csv: cleanup #573 2017-06-14 08:54:32 -07:00
Simon Michael
9d33fbee17 tests: csv: fix wrong use of echo #573
echo doesn't normally render \n as a newline. It was working on
some machines and not others, possibly due to a shelltestrunner
quoting bug,
2017-06-14 08:50:12 -07:00
Simon Michael
6de874c544 tests: csv: note some issues #573 2017-06-14 08:50:08 -07:00
Simon Michael
a104aee3a0 tests: csv: fix confusingly wrong numbering 2017-06-13 10:01:22 -07:00
Simon Michael
30a018337c bs: test for #552 2017-06-07 07:02:58 -07:00