Commit graph

78 commits

Author SHA1 Message Date
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
a38ed141c1 Switched to Boost.PropertyTree for XML generation 2012-05-18 01:31:01 -06:00
John Wiegley
8e8c2904f5 Never price commodities using annotated commodities 2012-03-30 00:51:05 -05:00
John Wiegley
0f180b917a Improved some error messages 2012-03-29 16:25:22 -05:00
John Wiegley
f9088f8836 Added --verify-memory and missing TRACE_[CD]TOR calls 2012-03-18 01:01:30 -05:00
John Wiegley
610a3e1709 Don't map_prices if price commodity matches source
Fixes #680
2012-03-15 04:58:53 -05:00
John Wiegley
363670d35b Tighten up argument passing related to fn_market() 2012-03-11 03:55:25 -05:00
John Wiegley
628875b33c Use Boost.Tuple 2012-03-09 03:19:25 -06:00
John Wiegley
21e8b7f6f0 Added nail_down() for pinning market value exprs 2012-03-08 00:55:06 -06:00
John Wiegley
97d68ebc8c Added "value" sub-directive for commodity directive 2012-03-06 03:24:06 -06:00
John Wiegley
9509a7b881 Made commodity_t::find_price a virtual function 2012-03-06 02:00:49 -06:00
John Wiegley
97dbf379d5 Rewrote the way annotated commodities are managed
The new scheme should be much more efficient, and allows for future
growth of what annotations may appear on a commodity.
2012-03-05 17:50:17 -06:00
John Wiegley
8d6bf11334 All tests are working again but one 2012-03-05 05:03:52 -06:00
John Wiegley
e910878312 Changes to get all the code to compile 2012-03-05 05:03:52 -06:00
John Wiegley
48ab6ad1db Switched to using Boost.Graph for commodity pricing 2012-03-05 05:03:52 -06:00
John Wiegley
e2afc783db Increased file copyrights to 2012 2012-02-29 22:32:23 -06:00
John Wiegley
f0791bbd72 Cleanup whitespace 2011-08-18 14:48:38 -04:00
John Wiegley
82e43fe125 If fixated price commodities are mixed, show them
For example, if a Ledger file contains transactions with the use of both
EUR and EUR {=PRICE}, then regular reports will always show the
{=PRICE}, disabling the by-name commodity merging that takes place.  In
brief, fixated and non-fixated commodities are now non-mergable.

If a file contains all of one, or all of the other, they will still be
merged, since these separate usages do not conflict the way that fixated
and non-fixated together do.
2010-06-20 20:29:53 -04:00
John Wiegley
968a6f3c0a Changes for building with Visual Studio 2008 2010-06-15 05:14:00 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
8637dd6ccf New display flag AMOUNT_PRINT_ELIDE_COMMODITY_QUOTES
This is used by reports like register and balance so that separated
commodities without spaces in them needed be surrounded by quotes.  It
will still occur in most other places.

Fixes #200 / F82CF11F-BFD9-4512-A562-202B04B68051
2010-06-09 06:45:07 -04:00
John Wiegley
be6cef93c4 A further simplification of -V and -X
With -X COMM, all values are computed in terms of COMM, regardless.

With -V, only secondary commodities will ever be computed, never
primaries.  Further, if a secondary commodities has an associated price,
the valuation is done in terms of that price's commodity.
2010-06-07 09:49:17 -04:00
John Wiegley
c85cf0d810 Fixed the way prices and costs are print'd 2010-06-07 08:32:14 -04:00
John Wiegley
f16a5382ed commodity_t::find_price now uses memoization
This reduces the slowdown of using -V and -X from 36x in some cases down
to around 4-5x (for a debug build).
2010-06-04 05:16:30 -04:00
John Wiegley
7f7243ff93 Made the behavior of -V a bit more rational
It now only values non-primary commodities in terms of primary ones.
2010-06-04 03:11:14 -04:00
John Wiegley
946534b102 A little bit of code cleanup 2010-06-04 02:23:04 -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
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
6870c54644 Refactored some comparison helper classes 2010-02-05 00:00:38 -05:00
John Wiegley
98fdb135c8 Added even more missing virtual keywords! 2009-11-22 23:13:48 -05:00
John Wiegley
4e30fcdf40 Many improvements to Ledger's Python bindings 2009-11-19 22:24:24 -05:00
John Wiegley
6cdb79e2a6 XML reporting now works via the "xml" command 2009-11-09 03:42:35 -05:00
John Wiegley
2c80227339 Added basic foundation for XML reporting 2009-11-09 02:17:26 -05:00
John Wiegley
394c7bd8df Removed a bunch of empty comments 2009-11-08 14:59:11 -05:00
John Wiegley
b14c814fec Whitespace fix 2009-11-04 20:40:42 -05:00
John Wiegley
1ef2274b3f Fixed a compiler warning 2009-11-03 14:51:11 -05:00
John Wiegley
690e46117e Added Python interface for commodity_t 2009-11-02 21:55:53 -05:00
John Wiegley
4befcfa27d Added Python interface for commodity_pool_t 2009-11-02 21:55:47 -05:00
John Wiegley
e663a13502 Changed protection level of many parts of commodity_t 2009-11-02 17:05:51 -05:00
John Wiegley
094794c640 Added a --european flag, to use commas for decimals
Ledger can often figure this out for itself, but this flag just makes it
the default behavior.  It is meant to be added to one's ~/.ledgerrc
file.
2009-11-02 02:39:31 -05:00
John Wiegley
de3893a08a Added missing TRACE_CTOR calls 2009-11-01 06:01:11 -05:00
John Wiegley
a757b19f51 Added serialization methods for most type
This allows journal_t objects to be completed serialized to disk and
deserialized.
2009-10-30 18:06:37 -04:00
John Wiegley
1fad2ec7c1 More refactoring for --download 2009-06-24 18:08:56 +01:00
John Wiegley
991e3a3eaf Split commodity.h/cc into three files
commodity.h - code for commodity_t
annotate.h  - commodity annotations
pool.h      - commodity pool management
2009-06-24 16:43:46 +01:00
John Wiegley
440124eacc Restored --download, although not done yet
The problem at this point is that it's recording prices in the price
database multiple times; it should only need to download a price for
each commodity once per day.
2009-06-24 02:44:07 +01:00
John Wiegley
86dfc1e0be The -X option now accepts price settings
For example, if you had 100 AU (onces of gold) and wanted to report it
in dollars, but at a price of $997 per ounce, you could now easily say:

  ledger bal -X '$,AU=$997'
2009-06-18 18:50:49 +01:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
1c7de0f9e4 Added "fixated commodity pricing"
If you put '=' before an annotated commodity's price, it will cause any
future market valuation of that commodity to use that price, and ignore
whatever changes may have happened since in the market price.  This can
be useful if you are tracking gas expenses based on a standard rate
which, although it changes over time, should not adjust the historical
valuation of how much the gas cost at the time it was purchased:

    2009/01/01 Payee
        Expenses:Gas                100 GAL {=$2}
        Liabilities:MasterCard        $-200
2009-03-02 16:39:26 -04:00
John Wiegley
38cf0e56f5 Added --lots-actual, to not print calc'd details 2009-02-27 15:45:21 -04:00
John Wiegley
79c7478278 Fixes to the way annotated prices are displayed 2009-02-24 03:40:57 -04:00