Commit graph

146 commits

Author SHA1 Message Date
John Wiegley
1bb29cdbb7 The register report has begun printing real data, although not all the pieces
are in place yet and the formatting is still off.
2008-07-29 21:44:21 -04:00
John Wiegley
4518ea9540 Value expression architecture is now rewritten, but the functionality of the
old system (for example, the meaning of 'a') has yet to be restored.  In the
new scheme, this will be done by definition a function outside of the value
expression logic, rather than the tight coupling between journal innards and
value expressions that occurred in 2.x.
2008-07-29 05:59:38 -04:00
John Wiegley
ebfe2d1011 Updated all copyright messages to 2003-2008. 2008-07-27 02:26:35 -04:00
John Wiegley
9e9f25b566 'make check' is now working again. Also, conversion from amount_t to/from
double has been disabled, because I am no longer packaging the gdtoa library
with Ledger (because double conversion really has nothing to do with what
Ledger does).  If you wish to use it, you can find gdtoa in cpp-rewrite-2006,
under a sub-directory of the same name.
2008-07-27 01:03:41 -04:00
John Wiegley
713f896790 A large body of work to get the register report printing again, but still
fails due to the fact that 2.x value expression syntax is not restored.
2008-07-27 00:10:35 -04:00
John Wiegley
961b30926b --verify works again, but the memory totals at the end still need work. 2008-07-26 04:08:55 -04:00
John Wiegley
ee39695722 Parsing now works again. And there was much rejoicing. 2008-07-24 11:36:40 -04:00
John Wiegley
643f2d33cf More work toward getting the textual parser working again. Since this means
that value expressions must work, there are a lot of details involved.
2008-07-24 09:02:47 -04:00
John Wiegley
f0f2b34ea9 More work toward getting my ledger data to parse. 2008-07-22 03:48:35 -04:00
John Wiegley
0a1bce0f80 Re-enabled almost all of the code in main.cc. 2008-07-20 23:28:29 -04:00
John Wiegley
88634973a2 Some basic fixes to get things almost running, although we still can't parse
my personal ledger file yet.
2008-07-19 23:10:37 -04:00
John Wiegley
d568319495 Merged in bug fixes from master (done for 2.6.1b) 2008-07-19 21:36:34 -04:00
John Wiegley
6cb519231f If AMOUNT_PARSE_NO_MIGRATE is set, do not set a commodity's precision even if
this is the first time a commodity is being seen.  The reason is that it's
quite possible (especially in bug reports) for the cost of a priced
transaction to contain the first occurrence of a commodity.
2008-07-17 20:55:15 -04:00
John Wiegley
6815aac361 Removed unnecessary assert. 2008-07-17 17:44:26 -04:00
John Wiegley
7ddb1415b6 Added #include lines for building on Debian lenny. 2008-07-13 22:50:21 -04:00
Nathan Jones
780135281d Fix compile errors with gcc 4.3 2008-05-20 17:13:34 -06:00
John Wiegley
d159501993 The code is compiling again, but it's far from being able to run yet. 2008-05-08 02:50:19 -04:00
John Wiegley
b45037e334 Migrated over both code and build environment from was-v3.0 branch. 2008-05-08 02:50:19 -04:00
John Wiegley
a451dd9285 Fixes to the commodity comparison logic. 2008-04-13 05:06:13 -04:00
John Wiegley
9ec136db90 *** empty log message *** 2008-04-13 02:41:32 -04:00
John Wiegley
5a93d4819e Reworked the way date/times are handled. 2008-04-13 02:41:32 -04:00
John Wiegley
a5aff9eee9 Several fixes to lot price handling. 2008-04-13 02:41:31 -04:00
John Wiegley
44561c1c1d Further refinement of commodity lot information. 2008-04-13 02:41:31 -04:00
John Wiegley
964e74e333 *** empty log message *** 2008-04-13 02:41:31 -04:00
John Wiegley
c8ebf53ed8 *** empty log message *** 2008-04-13 02:41:31 -04:00
John Wiegley
32bdfe20d9 Tons of corrections and fixes to value expressions and lot figures. 2008-04-13 02:41:31 -04:00
John Wiegley
9800e3febc *** empty log message *** 2008-04-13 02:41:31 -04:00
John Wiegley
31b68bbebc *** empty log message *** 2008-04-13 02:41:30 -04:00
John Wiegley
b1a04923fe *** empty log message *** 2008-04-13 02:41:30 -04:00
John Wiegley
30f79b0761 *** empty log message *** 2008-04-13 02:41:30 -04:00
John Wiegley
82d0ee869b Added --ansi and --ansi-invert options. 2008-04-13 02:41:30 -04:00
John Wiegley
e32d9e64a7 Added much better error location. 2008-04-13 02:41:29 -04:00
John Wiegley
b737cd8e6d Added a DATETIME value type. 2008-04-13 02:41:29 -04:00
John Wiegley
d02f74efea *** empty log message *** 2008-04-13 02:41:29 -04:00
John Wiegley
326235ffbe *** empty log message *** 2008-04-13 02:41:29 -04:00
John Wiegley
7acc1306d9 *** empty log message *** 2008-04-13 02:41:29 -04:00
John Wiegley
2ebfddf401 Began support for improved commodity handling. 2008-04-13 02:41:28 -04:00
John Wiegley
96d6d62ad9 Began support for improved commodity handling. 2008-04-13 02:41:28 -04:00
John Wiegley
0c55a5ee1b (read_binary_journal): Fixed a tiny memory leak when reading from a
binary cache.
2008-04-13 02:41:28 -04:00
John Wiegley
7901598f1d Checked in all major updates. 2008-04-13 02:41:27 -04:00
John Wiegley
0876d31157 (amount_t::valid): Don't verify the commodity as being non-null, since
NULL is a perfectly valid value for a commodity (it just means
null_commodity).  Also, never use commodity_->member, but always
commodity().member.
2008-04-13 02:41:25 -04:00
John Wiegley
a8012940f4 Removed Python integration support. 2008-04-13 02:41:21 -04:00
John Wiegley
ed63481f3b *** empty log message *** 2008-04-13 02:41:17 -04:00
John Wiegley
d65a758c84 Moved the setting of time quantities to the commodity initialization
section.
2008-04-13 02:41:16 -04:00
John Wiegley
1e6bfc7796 (amount_t::value): Corrected a problem with commodity rounding after
market values are determined (was using the wrong commodity's
precision value).
(commodity_t::value): Fixed the market value calculation algorithm,
which was very broken (but only seemed to show up if the price history
was very small).
2008-04-13 02:41:14 -04:00
John Wiegley
e8df173270 (find_commodity): Don't copy over the NOMARKET flag from the default
commodity.
2008-04-13 02:41:14 -04:00
John Wiegley
a10f3f02e7 (parse): Allow "-$100.00" as the equivalent of "$-100.00". 2008-04-13 02:41:12 -04:00
John Wiegley
3797cb1ad9 (amount_t::parse): Only set the SUFFIXED flag if there is actually a
commodity symbol.
2008-04-13 02:41:10 -04:00
John Wiegley
1823a2b886 (parse_conversion): When defining a commodity conversion, always mark
the larger unit as having no market value (the market price is
determined by looking up the base commodity and then multiplying).
2008-04-13 02:41:06 -04:00
John Wiegley
675319a0b0 (value): Use `std::map<>::lower_bound' to search for the nearest price
item in a commodity's history list.  This is much more efficient than
doing a reverse linear search.
2008-04-13 02:41:06 -04:00