John Wiegley
7fb328707c
Fixed another sort issue
2009-02-19 17:27:05 -04:00
John Wiegley
45e93d5f31
Added some sort-related debugging code
2009-02-19 17:25:29 -04:00
John Wiegley
1d85e992ca
A key fix to the ways accounts were sorted
...
Comparing integer < amount was doing the reverse comparison.
2009-02-19 17:20:36 -04:00
John Wiegley
9805abbf2b
Allow for sorting of the balance report
...
Sorting is repeated at each level of the hierarchy, unless --flat was
specified in which case it applies to the entire applicable accounts
list.
2009-02-19 16:53:25 -04:00
John Wiegley
d67c9fee0f
Added valexpr vars for accessing item position
...
- filename
- beg_line
- beg_pos
- end_line
- end_pos
2009-02-19 16:22:31 -04:00
John Wiegley
1c616f8626
If a transaction's total is null, return 0 instead
2009-02-19 15:51:14 -04:00
John Wiegley
3826cb1bee
Re-enabled parsing of timelog data
2009-02-19 15:50:24 -04:00
John Wiegley
c7cffa36ad
If a sorting value can't be found, report an error
2009-02-19 15:48:44 -04:00
John Wiegley
26ddb8343c
Don't sort or subtotal xacts for account reports
2009-02-19 15:47:54 -04:00
John Wiegley
bef9fdc471
If an account's aggregate amount is null, return 0
2009-02-19 15:46:57 -04:00
John Wiegley
f9607a57c1
Removed an unnecessary assert
...
It prevented the amount string "$1.00 " from being parsed.
2009-02-19 15:14:22 -04:00
John Wiegley
8af4451472
Use the 'market' function, not 'market_value'
2009-02-19 15:05:53 -04:00
John Wiegley
3dd0e74bbf
Some reformatting of the NEWS file
2009-02-19 15:03:21 -04:00
John Wiegley
9f963bda38
Auto-size register report based on COLUMNS
2009-02-19 14:44:28 -04:00
John Wiegley
5b897a12fc
Added a new --columns= option
2009-02-19 14:42:18 -04:00
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