Commit graph

52 commits

Author SHA1 Message Date
John Wiegley
0e9f782a05 Added % suffix operator, as in "$1.00 * 10%" 2009-05-26 23:45:44 -05:00
John Wiegley
1889d449b6 Added a missing * operation 2009-03-15 22:39:44 -04:00
John Wiegley
110f0b8023 Enabled use of pre-compiled headers by default 2009-03-10 17:02:03 -04:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
9d4e888ef5 Cured several harmless compiler warnings 2009-03-04 04:31:34 -04:00
John Wiegley
0f9d919367 Added Python-style if/else expression keywords 2009-03-03 13:26:27 -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
38122c2224 Corrected warnings g++-4.3.3 was complaining about 2009-02-28 04:54:54 -04:00
John Wiegley
38cf0e56f5 Added --lots-actual, to not print calc'd details 2009-02-27 15:45:21 -04:00
John Wiegley
f1795e628b Fixed bugs relating to sign and rounding of costs 2009-02-27 03:45:32 -04:00
John Wiegley
483a513d31 The letter 'z' was not allowed in commodity names 2009-02-27 01:54:59 -04:00
John Wiegley
238bd7f8a5 Marked all strings needing internationalization
These strings are now collected automagically in the file po/ledger.pot.
If you'd like to produce a translation, just run this command after
building Ledger:

    msginit -l LOCALE -o LANG.po -i po/ledger.pot

Where LOCALE is a string like de or en_GB, and LANG is a short
descriptive word for your language.

Then send me this .po file so I can commit it to the Ledger sources
(alternatively, you could maintain the file in a fork on GitHub), and
setup the build script to format and install your new message catalog
during a "make install".
2009-02-25 03:51:42 -04:00
John Wiegley
79c7478278 Fixes to the way annotated prices are displayed 2009-02-24 03:40:57 -04:00
John Wiegley
267b2ba5d8 Made commodity reduction during parsing consistent 2009-02-24 02:40:28 -04:00
John Wiegley
de6de07bac Many fixes to --market and --exchange
Also, --exchange now accepted multiple, comma-separated commodities.
2009-02-22 22:23:02 -04:00
John Wiegley
ea75613760 --exchange option now accepts multiple commodities
They must be separated by a comma, and all whitespace is ignored.
2009-02-22 17:51:11 -04:00
John Wiegley
e124811d8a Added --exchange (-x) option
This is like -V, except it lets you specify the goal commodity to report
in terms of, for example:

    reg -x CAD
2009-02-22 04:51:11 -04:00
John Wiegley
d0a664d102 Fixed several unused value and param warnings 2009-02-16 16:55:18 -04:00
John Wiegley
6f2e3b8864 Properly handle UTF-8 characters in commodity strings. 2009-02-12 02:34:39 -04:00
John Wiegley
139a7b486d Exclude | from the legal commodity character set, as per the comment. 2009-02-09 18:20:00 -04:00
John Wiegley
6f37d88391 Fixed a mistakenly const parameter. 2009-02-07 22:50:56 -04:00
John Wiegley
591ebbf1bd Moved parse_commodity_price into commodity_pool_t. 2009-02-07 21:55:38 -04:00
John Wiegley
d1f13be1d2 Fixed some incorrect #includes. 2009-02-07 19:48:29 -04:00
John Wiegley
08bc27ff0d Removed commodity_pool_t's use of boost::multi_index_container, and also its
used of the ident membe, which was only ever used by the binary cache code.
2009-02-07 18:41:45 -04:00
John Wiegley
2d941730b1 Largely removed all of Ledger's use of global variables, for the REPL's sake. 2009-02-04 19:55:27 -04:00
John Wiegley
3434650848 Removed the binary caching code, and the XML, QIF and Gnucash parsers. 2009-02-03 12:22:10 -04:00
John Wiegley
9f8997f1b5 Values can now be streamed to XML, and all the types they refer to. 2009-02-01 01:48:07 -04:00
John Wiegley
5a44784817 Removed the special "one" variable, and added amount_t::inverted(). 2009-01-31 04:57:24 -04:00
John Wiegley
e9ff5caa13 Rationals based math is now passing the unit tests. 2009-01-31 04:25:05 -04:00
John Wiegley
5ec98f3ed3 Several corrections to the way rationals are handled. 2009-01-31 01:25:29 -04:00
John Wiegley
02ac444374 Don't parse reserved word (such as "and" or "true") as commodity names. 2009-01-31 01:22:04 -04:00
John Wiegley
6213dc5af8 Whitespace fix. 2009-01-30 19:28:53 -04:00
John Wiegley
9aaab88c61 Update Doxygen documentation. Still much more work to be done. 2009-01-29 02:24:42 -04:00
John Wiegley
8b75b5cbfb Revised the way that parsing flags get passed around. 2009-01-29 02:24:25 -04:00
John Wiegley
094c64b67c amount_t and commodity_t objects can now stream themselves to XML. 2009-01-28 20:49:44 -04:00
John Wiegley
c49f05a15a Guard debug code in commodity.cc, so it will build optimized. 2009-01-23 19:50:35 -04:00
John Wiegley
d9e97cfede When parsing commodities, if there is no symbol or annotations, reset the
stream pointer in order to give more accurate error reporting.
2009-01-22 21:15:05 -04:00
John Wiegley
887828a40c Increased copyright range to include 2009. 2009-01-20 01:53:31 -04:00
John Wiegley
7cc64c04a5 Don't calculate a reflexive price if a commodity has been marked as NOMARKET. 2009-01-19 22:30:34 -04:00
John Wiegley
d9197fc2e5 Changed COMMODITY_STYLE_NOMARKET TO COMMODITY_NOMARKET. 2009-01-19 22:24:56 -04:00
John Wiegley
52e140d14e Lookup commodity prices recursively, searching for the newest data. 2009-01-19 19:59:49 -04:00
John Wiegley
009dd3969a Added a recursive, date-based commodity price searching capability. This
makes it possible to find all possible prices for a commodity by walking the
map of pricing relationships to all other commodities, even if the relation is
distant.
2009-01-19 17:48:27 -04:00
John Wiegley
b5386b2534 Added code to recursively search for a price in a given commodity. 2008-09-25 13:59:01 -04:00
John Wiegley
6007e3cbfe Did more restructing of commodity price histories, although the completed
find_price does not work yet.
2008-09-21 10:26:38 -04:00
John Wiegley
79a8fc5a87 Created several alternate 'value' methods to support the upcoming commodity
valuation changes.
2008-09-21 07:56:23 -04:00
John Wiegley
697f6a6bce Began initial work to support specifying a series of commodities to -V. 2008-09-20 14:46:18 -04:00
John Wiegley
1bbb6933af Cleaned up the way that commodity pricing is handled. 2008-09-20 13:48:36 -04:00
John Wiegley
1c2944d829 When automatically associating lot details with a commodity, use only the
price (based on the cost of the transactions), don't automatically use the
date and the entry code -- since most people aren't going to be that specific
at the time of sale, it's causes confusion in certain cases.
2008-09-19 08:07:51 -04:00
John Wiegley
8da86ae078 Removed dead code. 2008-08-17 03:47:01 -04:00
John Wiegley
3f8412f404 When printing commodity lot dates, using format_date(). 2008-08-13 02:58:10 -04:00