Commit graph

147 commits

Author SHA1 Message Date
Johann Klähn
a875940a93 fix ledger xml output, remove ledger json command
As the format used by property trees to represent valid JSON
and that for valid XML is too different and given that there are
more requests for valid XML output I decided to pursue a quick fix
and remove the json command in favor of a working xml command.

See bug #782, #909, recent discussion on mailing list.

JSON support is postponed until I or someone else finds time to work on
this or the python bindings are more stable.
2013-03-08 22:56:01 +01:00
John Wiegley
0951bcebef Bump copyright information to 2013 2013-02-18 06:51:21 -06:00
Craig Earls
01b8416f24 Fix bug 795 858, printing "(null)" instead of empty string "" 2013-02-02 09:44:31 -07: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
f4f3058b8c Switch to using Boost.Format 2012-05-14 21:44:00 -06:00
John Wiegley
60a281a55a Corrected an error print in value.cc 2012-03-19 00:30:29 -05:00
John Wiegley
62c04deb87 Quieted several compiler warnings from Clang 2012-03-11 05:08:55 -05:00
John Wiegley
363670d35b Tighten up argument passing related to fn_market() 2012-03-11 03:55:25 -05:00
John Wiegley
2303aa993c Allow balances to be passed to nail_down
Fixes #679
2012-03-11 03:06:50 -05:00
John Wiegley
1956393a44 Allow conversion of negative values with int() 2012-03-10 21:34:37 -06:00
John Wiegley
2df8edc71c Improved the behavior of -X 2012-03-09 20:02:53 -06:00
John Wiegley
cbc7bd337b Allow valuation of sequences 2012-03-09 16:21:19 -06:00
John Wiegley
c86bff2707 Whitespace fix 2012-03-08 00:44:48 -06:00
John Wiegley
b1107f85ae Removed value_t::price and balance_t::price 2012-03-07 10:32:24 -06:00
John Wiegley
72b1a948de Fixes to value_t to Python conversion 2012-03-01 17:45:25 -06:00
John Wiegley
e2afc783db Increased file copyrights to 2012 2012-02-29 22:32:23 -06:00
John Wiegley
9376b0f7b6 Corrected behavior of >= and <= 2012-02-28 04:02:24 -06:00
John Wiegley
bc9ff7095f Introduced a new SCOPE expression terminal 2012-02-20 17:20:22 -06:00
John Wiegley
a19b541dd9 Removed unneeded default cases 2012-02-17 15:15:32 -06:00
John Wiegley
8887fe9fa9 Removed unneeded break statements 2012-02-17 15:09:32 -06:00
John Wiegley
95717c9494 Added a missing case clause 2012-02-17 15:09:31 -06:00
John Wiegley
f0791bbd72 Cleanup whitespace 2011-08-18 14:48:38 -04:00
John Wiegley
65b3a778e2 value_t::print uses an output buffer now
This is so that  it plays nicely with straccstream.
2011-07-17 16:23:07 -05:00
John Wiegley
8da603cb81 Correct argument order for several exceptions 2011-07-17 16:22:14 -05:00
John Wiegley
7d005b8d98 Balances and sequences can be compared to amounts 2010-06-22 01:27:05 -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
f3fa011d39 Improved support for value_t::in_place* functions 2010-06-13 03:54:10 -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
77c5df4053 Errors involving value objects provide more context 2010-06-10 08:16:59 -04:00
John Wiegley
da2f415f14 In value_t::print, pass along display flags 2010-06-09 06:36:40 -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
d5ea3080a7 Allow null values to be cast to int and string 2010-05-30 03:19:09 -06:00
John Wiegley
7ec52d2b39 Comparison of boolean values is now allowed
true > false
2010-05-30 02:16:32 -06:00
John Wiegley
66a26252df Corrected error message text to be consistent 2010-05-30 02:15:45 -06:00
John Wiegley
2d28b34ff3 Allow expr_t& to be passed in a value_t 2010-05-08 02:00:35 -04:00
John Wiegley
7e79cd82cd Corrected a case for value < value 2010-03-06 00:58:05 -05:00
John Wiegley
fd4fa8a114 Change an exception test to a plain if 2010-03-05 22:14:14 -05:00
John Wiegley
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
6870c54644 Refactored some comparison helper classes 2010-02-05 00:00:38 -05:00
John Wiegley
5d4a0a39be The Python web server now uses jQuery Tablesorter 2009-11-21 02:06:01 -05:00
John Wiegley
4e30fcdf40 Many improvements to Ledger's Python bindings 2009-11-19 22:24:24 -05:00
John Wiegley
9a389650ea Allow ! and - operators on sequence values 2009-11-18 16:56:58 -05:00
John Wiegley
b2ba07b90c Fixed several time and date duration type uses 2009-11-17 21:28:43 -05:00