John Wiegley
2d28b34ff3
Allow expr_t& to be passed in a value_t
2010-05-08 02:00:35 -04:00
John Wiegley
75b7294a6d
Rewrite the "print" command as a custom function
...
There ended up being too many corner cases for the generalized formatter
to handle.
2010-03-08 01:11:48 -05:00
John Wiegley
ab416f759f
Updated copyrights to 2003-2010
2010-03-05 22:14:10 -05:00
John Wiegley
4e30fcdf40
Many improvements to Ledger's Python bindings
2009-11-19 22:24:24 -05:00
John Wiegley
afe87280e0
Added floored() and in_place_floor() methods
2009-11-11 03:39:53 -05:00
John Wiegley
115da19121
account.amount and .total return simplified values
2009-11-10 01:28:53 -05:00
John Wiegley
2c80227339
Added basic foundation for XML reporting
2009-11-09 02:17:26 -05:00
John Wiegley
c3535d06c8
Redesigned the expr_t, predicate_t, query_t classes
2009-11-09 02:06:06 -05:00
John Wiegley
5e3f3d7f47
Report sought magnitude when balancing errors occur
2009-11-05 17:43:28 -05:00
John Wiegley
4a14f3224b
Added value_t::push_front
2009-11-04 20:40:45 -05:00
John Wiegley
b14c814fec
Whitespace fix
2009-11-04 20:40:42 -05:00
John Wiegley
3043faf79f
Completed Python bindings for value_t
2009-11-02 22:51:21 -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
7ca80112fc
Change the value_t::POINTER type to value_t::SCOPE
...
scope_t pointers are the only kind that are ever stored in value
objects, so there was no need to make it generic and use boost::any.
2009-10-30 17:57:29 -04:00
John Wiegley
c26daee2cf
Pushing null values into a sequence is legitimate
2009-10-28 18:39:09 -04:00
John Wiegley
432be9e989
Removed unnused parameter to value_t::print
2009-10-27 22:25:13 -04:00
John Wiegley
e2875f47ec
Added some extra storage checks to value_t
2009-10-25 05:01:47 -04:00
John Wiegley
fc84eeb358
Rewrote the way date and time I/O is managed
2009-10-25 05:01:47 -04:00
John Wiegley
588f2ef2f5
Fixed many compiler warnings from g++ 4.4
2009-10-25 05:01:39 -04:00
John Wiegley
2ef1934bb0
Restored --price option, added baseline test
...
This option reports only in terms of the annotated price of the
commodities involved, otherwise it reports the amounts themselves. It
can be used in conjunction with other reports, as it applies to the
displayed amounts, not the actual amounts being calculated.
2009-06-26 17:15:35 +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
298a4faef3
Move amount colorization deeper into the core
...
This is necessary in order to redden negative amounts correctly under
all circumstances, such as component amounts of a multi-commodity
balance.
Fixes 727B2DF8-A2A1-4716-9C15-547F20D5F933
2009-06-16 16:57:10 +01:00
John Wiegley
d3c93b73cb
Added a value_t macro: VALUE_OR_VERO
2009-03-05 21:00:32 -04:00
John Wiegley
c11d325712
Reduced the #include dependency tree to a minimum
2009-03-04 23:53:43 -04:00
John Wiegley
2d63c9364a
Changed many assert() calls to VERIFY()
2009-03-04 04:29:10 -04:00
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