John Wiegley
0951bcebef
Bump copyright information to 2013
2013-02-18 06:51:21 -06:00
Craig Earls
0df1366168
Bug 634 Added roundto function, optimized floor and ceiling
...
Fixes Bug634 by adding roundto(amount, places).
2013-01-30 15:35:31 -07:00
Craig Earls
b044a74bd3
Bug 634 and 488, Corrected behavior of floor, and added ceiling
...
This is only a partial fix for 634, since rounding is not fixed.
2012-10-25 22:28:26 -07:00
John Wiegley
4681e58d7f
Converted the Ledger build system to use CMake
2012-05-20 04:48:05 -05:00
John Wiegley
a38ed141c1
Switched to Boost.PropertyTree for XML generation
2012-05-18 01:31:01 -06:00
John Wiegley
22505d9527
Always call TRACE_CTOR at the end of constructors
2012-03-20 02:10:40 -05:00
John Wiegley
363670d35b
Tighten up argument passing related to fn_market()
2012-03-11 03:55:25 -05:00
John Wiegley
b1107f85ae
Removed value_t::price and balance_t::price
2012-03-07 10:32:24 -06:00
John Wiegley
e2afc783db
Increased file copyrights to 2012
2012-02-29 22:32:23 -06:00
John Wiegley
f322769775
Added value_t::to_size_t method
2012-02-17 15:09:32 -06:00
John Wiegley
8f3178191c
Fixes for variable shadowing (28/28)
2012-02-17 15:06:31 -06:00
John Wiegley
1afbd183d2
Work around a bug in Clang 3.0 (already fixed in pre-3.1)
2012-02-10 10:25:37 -10:00
John Wiegley
f0791bbd72
Cleanup whitespace
2011-08-18 14:48:38 -04:00
John Wiegley
20f4ccde96
Added some debug code
2011-02-10 23:00:36 -05:00
John Wiegley
cf0147fcd0
Removed an invalid called to VERIFY()
2010-06-13 05:57:02 -04:00
John Wiegley
ad3b30a964
In value_t::_dup, test if storage is uninitialized
2010-06-13 05:01:54 -04:00
John Wiegley
4a44218da1
For value_t, use boost::any to refer to objects
2010-06-13 03:55:08 -04:00
John Wiegley
44a5103e1c
Moved value_t::label() to value.cc
2010-06-13 03:54:36 -04:00
John Wiegley
536e3e7322
Added a new scope_value() inline helper function
2010-06-13 01:03:48 -04:00
John Wiegley
dea2aed0b5
Untabified all source files
2010-06-11 17:02:25 -04:00
John Wiegley
92d2eb9574
Use ptr_deque for value_t::sequence_t
...
This is to work around undefined behavior according to the Standard,
[lib.res.on.functions]/2:
"In particular, the effects are undefined in the following cases: [..]
- if an incomplete type (3.9) is used as a template argument when
instantiating a template component."
2010-06-10 16:32:24 -04:00
John Wiegley
be6cef93c4
A further simplification of -V and -X
...
With -X COMM, all values are computed in terms of COMM, regardless.
With -V, only secondary commodities will ever be computed, never
primaries. Further, if a secondary commodities has an associated price,
the valuation is done in terms of that price's commodity.
2010-06-07 09:49:17 -04:00
John Wiegley
a4d4f99794
amount_t::print and value_t::print now use flags
2010-06-07 08:32:13 -04:00
John Wiegley
16f799767c
Value expression sequences are now comparable
...
Fixes #228 / ED9388D7-E523-40EB-841B-9AE9BAA70329
2010-06-05 03:26:43 -04:00
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