Commit graph

1745 commits

Author SHA1 Message Date
John Wiegley
39bdbbe053 The sequence -M -p 2004 now equals -p 2004 -M 2009-02-19 14:26:08 -04:00
John Wiegley
7d1f125fa2 Renamed a debug category to be consistent 2009-02-19 14:21:00 -04:00
John Wiegley
1f1a83c083 Restored the -j and -J options 2009-02-19 13:40:48 -04:00
John Wiegley
b684783eff Moved init of options to the options themselves 2009-02-19 13:29:15 -04:00
John Wiegley
33786a5c8a Moved an exception, so the report is more general 2009-02-19 13:26:22 -04:00
John Wiegley
509ad47b39 Accept --long-option=value 2009-02-19 13:06:55 -04:00
John Wiegley
cae49a2998 Efficiency fix for the formatting code 2009-02-19 12:49:25 -04:00
John Wiegley
2f083b8bdb Exchanged inclusion of report.h for account.h
The data sub-library should never depend on the reporting code.
2009-02-19 01:37:57 -04:00
John Wiegley
a8e73064cf Improved how register reports are formatted
As a result, --wide is working again, and --wide-register-format has
been removed.  Also, the following new options are recognized, for
controlling per-column formatting:

    --date-width NUM
    --payee-width NUM
    --account-width NUM
    --amount-width NUM
    --total-width NUM
2009-02-19 01:36:21 -04:00
John Wiegley
b9624df86b If an option has been handled, return its value 2009-02-19 01:32:27 -04:00
John Wiegley
7a0597dbe3 Removed an unnecessary friend declaration 2009-02-19 01:27:18 -04:00
John Wiegley
1fa3c1956f Moved amount_t::right_justify to simply ::justify 2009-02-19 01:22:22 -04:00
John Wiegley
ec08dee745 Always perform tilde expansion on input pathnames 2009-02-18 21:00:02 -04:00
John Wiegley
dac10c8cf6 Parse 2004/01 as YYYY/mm 2009-02-18 00:09:59 -04:00
John Wiegley
4414fddb00 Fixed use of the -p flag without an interval
That is, -p 2004/01 is equivalent to "-b 2004/01/01 -e 2004/01/31"
again.
2009-02-17 22:57:02 -04:00
John Wiegley
4ec2dfeef1 Added --flat option, to flatten the balance report 2009-02-17 21:19:31 -04:00
John Wiegley
93d195f1d9 Only display a final balance total if necessary
In the case where only one top-level account is being reported, there is
no reason to duplicate the total balance shown.
2009-02-17 19:48:42 -04:00
John Wiegley
07f4aefdfd Removed the %*| special char, for %*(" ") 2009-02-17 17:58:50 -04:00
John Wiegley
67fd38e073 The option --cost is now an alias for --basis 2009-02-17 06:51:40 -04:00
John Wiegley
8c0bea159c The tools/build script now wants make targets 2009-02-17 05:24:28 -04:00
John Wiegley
e1c37aeee8 Improved the --collapse filter
It now takes the --display and --only predicates into account, so that
it never appears to be collapsing single transactions.

There are cases where there are multiple transactions, but the display
or only predicate filters them out, so that if collapse didn't consider
this, the user would wonder why a single transaction was being collapsed
-- since they'd never see that collapse saw more than two.
2009-02-17 05:22:59 -04:00
John Wiegley
6afd2b39cf Changed a debug category to be more accurate 2009-02-17 04:50:46 -04:00
John Wiegley
ce8442a30d Rewrote how the balance command displays accounts
The previous method bent over backwards to try and avoid multiple passes
through the account tree, but the result was a horribly complicated mess
that never ceased to dredge up obscure bugs.  The new scheme is a very,
very simple two-pass algorithm, with multiple subpasses during the
second pass for refining the output based on the report options.
2009-02-17 04:49:10 -04:00
John Wiegley
7dc6e6f109 Added a new tools/build utility script 2009-02-17 04:34:21 -04:00
John Wiegley
a3276ae491 Fixed a typo. 2009-02-16 21:29:20 -04:00
John Wiegley
e6934fbd3c Removed an unused extended account xdata flag 2009-02-16 21:23:12 -04:00
John Wiegley
e3b44038b3 Moved format_accounts::should_display out of line 2009-02-16 21:00:30 -04:00
John Wiegley
db0689f547 Added a "commodity" valexpr variable for xacts 2009-02-16 20:56:50 -04:00
John Wiegley
72cdb41727 Added new --set-acount and --set-payee options
These fully generalize the previous --payee-as-account and such options,
which, for example, is now implemented to be the same as saying,
"--set-account payee".
2009-02-16 20:50:20 -04:00
John Wiegley
15bfeb3cb1 Added several new reporting options
To help with gathering specific reports:

 - --payee-as-account copies the entry's payee field to the account,
   allowing the subtotal report to show unique payees for each period.
 - --comm-as-account copies the transaction's amount's commodity to the
   account.
 - --code-as-account copies the entry's code to the account

Also created aliases for some of these options, for conistency's sake:

 - --commodity-as-payee is now an alias for --comm-as-payee
 - --commodity-as-account is now an alias for --comm-as-account
2009-02-16 18:11:23 -04:00
John Wiegley
053ecc9366 Fixed a possible problem with xact_t::date() 2009-02-16 18:06:30 -04:00
John Wiegley
2a79d2d3bd Increase amount of warnings reported with --pch 2009-02-16 17:33:29 -04:00
John Wiegley
5dc8f6bccb Report better errors if options are missing args 2009-02-16 17:30:34 -04:00
John Wiegley
b7f2a95c1f Accept --first/--last as synonyms for --head/--tail 2009-02-16 17:25:19 -04:00
John Wiegley
275da22752 Fixed the --head and --tail options 2009-02-16 17:17:57 -04:00
John Wiegley
bc2983928d Compilation verification code only with debugging
Previously, --verify would work even if the sources were built with
default options.  However, in the interests of performance, --verify is
now only available if --enable-debug was passed to configure.
2009-02-16 17:15:52 -04:00
John Wiegley
5e1870e259 Added --args-only flags, to ignore init and env 2009-02-16 16:57:32 -04:00
John Wiegley
d0a664d102 Fixed several unused value and param warnings 2009-02-16 16:55:18 -04:00
John Wiegley
32e2d58d43 Simplified the stats command 2009-02-16 05:03:04 -04:00
John Wiegley
89c01e74e6 Made "stat" a synonym for the "stats" command 2009-02-16 04:51:23 -04:00
John Wiegley
479ac0ce36 Fleshed out the "stats" command 2009-02-16 04:50:11 -04:00
John Wiegley
1aff6ec01d Abort journal parsing if Control-C is caught 2009-02-16 04:16:20 -04:00
John Wiegley
4365d9e3fc Moved around some functions for clarity 2009-02-16 04:10:22 -04:00
John Wiegley
aa69b273de Changed some value_t method names
- simplify -> simplified
 - cast -> casted

This is to differentiate them from in_place_cast and in_place_simplify.
2009-02-16 04:00:01 -04:00
John Wiegley
4de2f50818 Always print zero amounts as "0" 2009-02-16 03:46:52 -04:00
John Wiegley
1aeb5e5997 acprep now uses ccache for --devel if available 2009-02-16 03:16:12 -04:00
John Wiegley
b5a972d1a0 The -n option for bal command is working again
The fix was that when appending new predicates, enclosed both sides of
the AND with parentheses.
2009-02-16 02:51:09 -04:00
John Wiegley
e3b40f5bb6 Fixed how subtotal date ranges are computed 2009-02-16 02:31:21 -04:00
John Wiegley
4dbd124e22 Revert "Propagate xact effective date in two places"
This reverts commit 17a0ab8407.
2009-02-16 02:16:34 -04:00
John Wiegley
17a0ab8407 Propagate xact effective date in two places 2009-02-16 01:19:59 -04:00