John Wiegley
8e8c2904f5
Never price commodities using annotated commodities
2012-03-30 00:51:05 -05: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
ca8f702a1b
Added amount_t::commodity_ptr()
2012-03-09 03:25:53 -06:00
John Wiegley
ec1f15a4b2
Made amount_t::price return an optional<amount_t>
2012-03-07 10:32:35 -06:00
John Wiegley
8d6bf11334
All tests are working again but one
2012-03-05 05:03:52 -06:00
John Wiegley
e2afc783db
Increased file copyrights to 2012
2012-02-29 22:32:23 -06:00
John Wiegley
f0791bbd72
Cleanup whitespace
2011-08-18 14:48:38 -04:00
John Wiegley
e162455ebb
Minor simplifications to valexpr parser
...
The most significant change is the way CONS sequences are parsed, and
that now instead of =/:=, the operators are ==/=.
2010-09-05 01:38:47 -04:00
John Wiegley
968a6f3c0a
Changes for building with Visual Studio 2008
2010-06-15 05:14:00 -04:00
John Wiegley
dea2aed0b5
Untabified all source files
2010-06-11 17:02:25 -04:00
John Wiegley
8637dd6ccf
New display flag AMOUNT_PRINT_ELIDE_COMMODITY_QUOTES
...
This is used by reports like register and balance so that separated
commodities without spaces in them needed be surrounded by quotes. It
will still occur in most other places.
Fixes #200 / F82CF11F-BFD9-4512-A562-202B04B68051
2010-06-09 06:45:07 -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
946534b102
A little bit of code cleanup
2010-06-04 02:23:04 -04:00
John Wiegley
0f1afdb3a7
Minor optimization of amount_t::operator*
2010-06-03 05:47:12 -04:00
John Wiegley
04461f49fd
Optimized amount_t::in_place_truncate
2010-05-26 00:58:04 -06:00
John Wiegley
ab416f759f
Updated copyrights to 2003-2010
2010-03-05 22:14:10 -05:00
John Wiegley
bd455c9874
Added string conversion op for amounts and balances
2009-11-20 23:23:22 -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
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
c3535d06c8
Redesigned the expr_t, predicate_t, query_t classes
2009-11-09 02:06:06 -05:00
John Wiegley
b14c814fec
Whitespace fix
2009-11-04 20:40:42 -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
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
c11d325712
Reduced the #include dependency tree to a minimum
2009-03-04 23:53:43 -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
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
fc349389e3
Restored the --budget option
2009-02-20 23:12:23 -04:00
John Wiegley
f9607a57c1
Removed an unnecessary assert
...
It prevented the amount string "$1.00 " from being parsed.
2009-02-19 15:14:22 -04:00
John Wiegley
1fa3c1956f
Moved amount_t::right_justify to simply ::justify
2009-02-19 01:22:22 -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
6f2e3b8864
Properly handle UTF-8 characters in commodity strings.
2009-02-12 02:34:39 -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
4a28e1765c
Fixed some #include ordering issues.
2009-02-07 19:36:51 -04:00
John Wiegley
2cdc83c94a
Whitespace fix.
2009-02-07 18:43:12 -04:00
John Wiegley
a085f8e9ad
Only initialize the amount_t module if it hasn't been already.
2009-02-06 03:30: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
24ef163ba5
Removed unneeded member variables.
2009-02-04 00:35:02 -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
1ece3f8b1c
Added documentation stubs for all include files and classes.
2009-01-31 15:28:23 -04:00
John Wiegley
cce65b8dd2
Added a more efficient amount_t::operator==, which changed semantics slightly.
2009-01-31 04:58:16 -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
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
6213dc5af8
Whitespace fix.
2009-01-30 19:28:53 -04:00