Commit graph

70 commits

Author SHA1 Message Date
John Wiegley
b2ba07b90c Fixed several time and date duration type uses 2009-11-17 21:28:43 -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
c8bab6d1c6 Throw an error if UTF-8 encoding is incorrect 2009-11-07 06:39:14 -05:00
John Wiegley
690e46117e Added Python interface for commodity_t 2009-11-02 21:55:53 -05:00
John Wiegley
e663a13502 Changed protection level of many parts of commodity_t 2009-11-02 17:05:51 -05:00
John Wiegley
3f8c126c79 Use is_annotated() method rather than "annotated" 2009-11-02 16:57:53 -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
3909d2678e Removed most #if 0 blocks and callout comments 2009-10-31 04:50:07 -04:00
John Wiegley
cc532c31aa Added TRUE_CURRENT_TIME() macro
Because CURRENT_TIME() can now be a past date if --now is used.
2009-10-28 01:17:54 -04:00
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