Commit graph

46 commits

Author SHA1 Message Date
John Wiegley
fbb0d25831 Gave round/unround/truncate all in_place_ variants 2009-02-27 02:15:27 -04:00
John Wiegley
74e569e220 Added a truncated() method for amounts and values
When an amount is truncated, it drops all of the extra precision and
becomes exactly the value would have seen were it printed.
2009-02-26 00:10:08 -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
d396fa5145 Fixed an alignment bug in value context display 2009-02-24 14:53:33 -04:00
John Wiegley
bc1a196f02 Added non-const value_t::begin and value_t::end 2009-02-23 14:25:09 -04:00
John Wiegley
30005d1ba5 Push a sequence onto a sequence only appends now
Previously, it would merge sequences A and B.
2009-02-23 14:14:22 -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
04fd1ae24c Fixed the way values are justified for printing 2009-02-22 04:51:11 -04:00
John Wiegley
aeea1cb3e1 Fixed a memory leak in value_t::storage_t 2009-02-21 03:48:02 -04:00
John Wiegley
fc349389e3 Restored the --budget option 2009-02-20 23:12:23 -04:00
John Wiegley
1fa3c1956f Moved amount_t::right_justify to simply ::justify 2009-02-19 01:22:22 -04:00
John Wiegley
aa69b273de Changed some value_t method names
- simplify -> simplified
 - cast -> casted

This is to differentiate them from in_place_cast and in_place_simplify.
2009-02-16 04:00:01 -04:00
John Wiegley
fcd7f4f73b Removed "total_cost" valexpr, and value_t::cost
Since cost reports are now calculated by setting the amount_ expression,
there is no need to track a separate "total cost" entity.
2009-02-15 16:26:26 -04:00
John Wiegley
49a1373deb Renamed a function to sort_value_is_less_than
The purpose was to provided a clearer relationship between the function
name and its expected arguments.
2009-02-12 22:47:27 -04:00
John Wiegley
092542a3bf Sorting expr now uses "-" to indicate descending
For example: -S payee,-date sorts 1) ascending by payee, then 2)
descending by date.
2009-02-12 20:45:33 -04:00
John Wiegley
e0e181d2af Made (un)reduce rvalue methods more consistent
They names were changed from reduce/unreduce to reduced/unreduced, since
they return the modified value.  This is more consistent with the naming
of rounded/rounded.
2009-02-12 20:44:46 -04:00
John Wiegley
dc68903bb2 Added validation code for mask_t objects. 2009-02-12 03:06:15 -04:00
John Wiegley
433bb11fa9 Moved value_t::set_type into value.cc, since it had grown. 2009-02-12 02:36:14 -04:00
John Wiegley
9344598eb0 Inlined value_t::_clear(), since it only had one caller. 2009-02-12 02:35:22 -04:00
John Wiegley
f605e107fc A fix to the last fix. 2009-02-10 21:24:28 -04:00
John Wiegley
7de6050269 A fix for users of Boost 1.35. 2009-02-10 21:14:44 -04:00
John Wiegley
d726624e60 Changed value_t to use boost::any (more type-safe). 2009-02-10 04:24:06 -04:00
John Wiegley
3f7104e9be Removed the balance_pair_t type, since it's now an unneeded abstraction.
This type was a holdback from the days before the amount_expr was used
everywhere to determine a transaction's value.
2009-02-09 14:54:42 -04:00
John Wiegley
b662509ee9 amount_t::in_place_* now returns void. Added value_t::unreduce. 2009-02-07 22:50:19 -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
56b3a49f63 Fixed some warnings caused by using g++ 4.3. 2009-02-02 21:46:35 -04:00
John Wiegley
9540406af1 Simplified error context handling. 2009-02-02 00:24:26 -04:00
John Wiegley
fb5428ce85 Added support for metadata and tagging, and made regexs a first-class type. 2009-02-01 22:10:32 -04:00
John Wiegley
ae65e8ae05 Moved the pre-commands to their own file, and created new "args" command. 2009-02-01 18:36:28 -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
e9ff5caa13 Rationals based math is now passing the unit tests. 2009-01-31 04:25:05 -04:00
John Wiegley
e0dd2cd0a4 Changed to using rational numbers instead of integer approximations.
As a result, dependency on the gdtoa was dropped, and dependency on mpfr was
added.
2009-01-30 19:30:16 -04:00
John Wiegley
f1257cbc3e Removed all dependency on gdtoa. 2009-01-30 16:19:31 -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
b205090bb7 Changed around the ==, < and > operators in value.h to be correct. 2009-01-28 17:17:06 -04:00
John Wiegley
71e7157a65 Added is_nonzero and a stream-based read() method to value_t. 2009-01-26 20:50:54 -04:00
John Wiegley
e95e8c3f79 Corrected a parse-time optimization of "! CONSTANT". 2009-01-22 18:53:44 -04:00
John Wiegley
887828a40c Increased copyright range to include 2009. 2009-01-20 01:53:31 -04:00
John Wiegley
adf8cfbbc0 Can now determine the market value of balance pairs, even if stored within
value_t objects.
2009-01-19 22:23:02 -04:00
John Wiegley
0135c28049 Added in_place_round method to all Ledger numerical types. 2008-09-14 19:36:55 -04:00
John Wiegley
1c079630cf Removed more "pending" type comments. 2008-08-17 03:51:28 -04:00
John Wiegley
548a03e725 Regular expressions supplied after 'reg' or 'bal' are working again. 2008-08-10 02:54:36 -04:00
John Wiegley
c9d575abce Basic balance reports are working again! 2008-08-10 00:57:29 -04:00
John Wiegley
da6ceaba1a Updated the Doxygen docs so that all the core numerics files are in the same
module group.
2008-08-05 19:49:01 -04:00
John Wiegley
f6f4a46cf5 Moved around most of the files so that source code is in src/, documentation
is in doc/, etc.
2008-08-05 18:05:49 -04:00
Renamed from value.h (Browse further)