Commit graph

1358 commits

Author SHA1 Message Date
John Wiegley
dbac09405f Added new command: "pricemap [DATE]"
This outputs the pricing relationship of commodities in your data file,
as of DATE (optional), using the DOT language.  If you have graphviz
installed, it can be viewed quite simply using:

  ledger pricemap | dotty -

Each relationship in the graph shows the conversion factor to exchange
one commodity for another, and the date at which this factor was
determined.
2010-06-04 02:53:18 -04:00
John Wiegley
946534b102 A little bit of code cleanup 2010-06-04 02:23:04 -04:00
John Wiegley
45451125e3 Simplified some debug code 2010-06-03 23:23:12 -04:00
John Wiegley
f76b271d24 Removed a redundant check 2010-06-03 23:18:18 -04:00
John Wiegley
e8bf3da053 Short-circuit annotated commodity valuation 2010-06-03 17:59:43 -04:00
John Wiegley
e6c5837b2c Corrected a debug statement 2010-06-03 17:57:09 -04:00
John Wiegley
27b86a5388 Avoid unnecessary object copying when using foreach 2010-06-03 17:43:38 -04:00
John Wiegley
0f1afdb3a7 Minor optimization of amount_t::operator* 2010-06-03 05:47:12 -04:00
John Wiegley
3a0f096cb6 Added new "addr" value expression function
It returns the address of the given object as an integer.  This can be
used to uniquely compare entities.
2010-06-03 05:37:21 -04:00
John Wiegley
30479c0e12 A simple, yet significiant, optimization
Every annotated commodity is based on a "referent", or the unannotated
version of that commodity.  When stripping all annotations away,
however, rather than simply returning the referent we were actually
searching for it by name.  There was no reason to do this, not to
mention it was taking up to 7% of the total runtime of some reports.
2010-06-03 01:26:30 -04:00
John Wiegley
3324e3472d Removed some debug code 2010-06-03 00:54:10 -04:00
John Wiegley
cbc0a125c0 Correct display of amounts with keep_precision
Fixes #167 / 1D275740-D1A6-42B7-BDE4-F2F85E30CE8E
2010-06-02 06:24:25 -04:00
John Wiegley
90d5ef83b6 Don't gen posting with same cost, amount commodity 2010-06-02 06:13:40 -04:00
John Wiegley
79fe46eae8 Don't use --pager or --color with --output 2010-06-02 04:55:45 -04:00
John Wiegley
75363003bd Throw an exception if mpfr_asprintf fails 2010-06-02 04:01:16 -04:00
John Wiegley
10df662166 Wrap a default account name with _() 2010-06-02 04:00:43 -04:00
John Wiegley
17b29a6378 Inlined the print_xacts constructor 2010-06-02 03:39:29 -04:00
John Wiegley
d6a559959c Moved a misplaced parenthesis 2010-06-02 03:39:22 -04:00
John Wiegley
e275caa5fb Two members of journal_t weren't being serialized 2010-06-02 02:08:44 -04:00
John Wiegley
8c61ba013f Changed two uses of delete to checked_delete() 2010-06-02 00:27:59 -04:00
John Wiegley
e0c5f6db30 Fixed two memory reference errors 2010-06-02 00:27:35 -04:00
John Wiegley
5cdd36f358 Further improved parsing of query expressions
Fixes #210 / D4C2DD6F-8967-4FFC-BBBC-A941F9C53475
2010-06-01 18:33:13 -04:00
John Wiegley
038c24357e Changed --european option to --decimal-comma
Fixes #211 / 1736ACA5-5DE6-4826-AEB4-DB5B2A2217AC
2010-06-01 17:56:41 -04:00
John Wiegley
d513c71236 Minor optimization 2010-06-01 17:40:27 -04:00
John Wiegley
d19745afde Improve parsing of 'expr' query terms
Fixes #157 / 9DF85DF2-4BF5-4931-A30C-2592A10BB5C0
2010-06-01 17:32:41 -04:00
John Wiegley
6512201292 Changed a comment 2010-06-01 16:55:24 -04:00
John Wiegley
df0edbd2dc Minor optimization 2010-05-31 15:13:04 -06:00
John Wiegley
654c842348 -G option now takes price history into account 2010-05-30 21:58:05 -06:00
John Wiegley
5a2644c1b7 -V/-X options now take price history into account 2010-05-30 20:49:50 -06:00
John Wiegley
58621a96a2 Made several debug categories more consistent 2010-05-30 20:43:45 -06:00
John Wiegley
d5ea3080a7 Allow null values to be cast to int and string 2010-05-30 03:19:09 -06:00
John Wiegley
4f3b39e22c Empty notes and tags now return null values 2010-05-30 03:01:11 -06:00
John Wiegley
647d4aac2f New: --group-by=EXPR and --group-title-format=FMT
The --group-by option allows for most reports to be split up into
sections based on the varying value of EXPR.  For example, to see
register subtotals by payee, use:

  ledger reg --group-by=payee -s

This works for separated balances too:

  ledger bal --group-by=payee

Another interesting possibility is seeing a register of all the accounts
affected by a related account:

  ledger reg -r --group-by=payee

The option --group-title-format can be used to add a separator bar to
the group titles.  The option --no-titles can be used to drop titles
altogether.
2010-05-30 02:47:40 -06:00
John Wiegley
a41d33fba3 Option --rounding inverted to --no-rounding 2010-05-30 02:47:40 -06:00
John Wiegley
e86a4767bc Added new post_splitter posting handler 2010-05-30 02:47:35 -06:00
John Wiegley
f491979d55 Added new option: --no-titles 2010-05-30 02:42:36 -06:00
John Wiegley
3215fd71a4 Added optional item_handler::title() method 2010-05-30 02:38:33 -06:00
John Wiegley
4d372a8e1e Added value_scope_t, for wrapping a value in a scope
The value expression "value" may be used to extract the wrapped value.
This is currently only used by the upcoming --group-title-format option.
2010-05-30 02:38:32 -06:00
John Wiegley
8f17d01f5e Added new required item_handler_t::clear() method 2010-05-30 02:38:30 -06:00
John Wiegley
7ec52d2b39 Comparison of boolean values is now allowed
true > false
2010-05-30 02:16:32 -06:00
John Wiegley
66a26252df Corrected error message text to be consistent 2010-05-30 02:15:45 -06:00
John Wiegley
51115f0a91 Updated to Boost 1.43 2010-05-27 21:35:41 -06:00
John Wiegley
04461f49fd Optimized amount_t::in_place_truncate 2010-05-26 00:58:04 -06:00
John Wiegley
7bddcd676b Added --rounding option, which is off by default
The purpose of this option is to add special "<Rounding>" postings, to
ensure that a regiter's running total is *always* the sum of its
postings.  Within --rounding, these adjustment postings are missing,
which was the behavior in Ledger 2.x.  It can be orders of magnitude
slower to turn it on for large reports with many commodities.
2010-05-23 15:45:51 -06:00
John Wiegley
847a5e4e73 Optimized several "in_place" function in balance_t 2010-05-23 15:23:19 -06:00
John Wiegley
efcede3ca5 Fix to an interaction between --period and --sort
Fixes 3AAB00ED-9904-4380-8988-16506B0AFE08
2010-05-23 01:11:27 -06:00
John Wiegley
834d223c27 Do not generate names with double underscores
Fixes 6A4AFDC2-DE87-48A5-A17D-B04120EE1F62
2010-05-23 00:37:54 -06:00
John Wiegley
3fab2e1333 For Boost 1.35 and earlier, use is_regular
Fixes 0F17CB7F-A000-4F99-8471-739948AD575F
2010-05-23 00:34:26 -06:00
John Wiegley
7bd0170d51 print honors --columns, --account,amount-width 2010-05-22 23:34:12 -06:00
John Wiegley
0f3e7e3e7f The print command now honors use of --date-format 2010-05-22 22:05:03 -04:00