John Wiegley
588f2ef2f5
Fixed many compiler warnings from g++ 4.4
2009-10-25 05:01:39 -04:00
John Wiegley
b90ec25522
Reject downloaded quotes price in the wrong commodity
2009-06-28 15:57:49 +01: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
7287aad336
Revert "Added % suffix operator, as in "$1.00 * 10%""
...
This reverts commit 0e9f782a05 .
2009-06-21 17:49:38 +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
463f741ed2
Allow an amount to be zero, even if cost is non-zero
...
The only real change is that exchanges of zero-amount will not result in
any exchange at all, just the "motions".
Fixes 6DAB9FE3-1399-4727-9AB1-FE413FB85A03
2009-06-16 16:23:58 +01:00
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