John Wiegley
83648af19f
Added the concept of a "display_total", used for showing the values in the
...
totals column of both the register and balance reports. This is different
from the internal calculated total, which is still "total_expr".
2009-01-19 22:27:10 -04:00
John Wiegley
5c17da6572
Instead of doing price annotations in the textual parser, use
...
commodity_t::exchange.
2009-01-19 22:25:12 -04:00
John Wiegley
d9197fc2e5
Changed COMMODITY_STYLE_NOMARKET TO COMMODITY_NOMARKET.
2009-01-19 22:24:56 -04:00
John Wiegley
14b3eb89f5
Added methods for getting the cost of an xact.
2009-01-19 22:23:45 -04:00
John Wiegley
091144e5e8
Don't look for an xact's state in its entry if there isn't one.
2009-01-19 22:23:27 -04:00
John Wiegley
adf8cfbbc0
Can now determine the market value of balance pairs, even if stored within
...
value_t objects.
2009-01-19 22:23:02 -04:00
John Wiegley
52e140d14e
Lookup commodity prices recursively, searching for the newest data.
2009-01-19 19:59:49 -04:00
John Wiegley
5cc99a6972
Changed COMMODITY_STYLE_BUILTIN to COMMODITY_BUILTIN, and added new flag
...
COMMODITY_WALKED, for avoiding infinite recursions during price lookups.
2009-01-19 19:58:47 -04:00
John Wiegley
009dd3969a
Added a recursive, date-based commodity price searching capability. This
...
makes it possible to find all possible prices for a commodity by walking the
map of pricing relationships to all other commodities, even if the relation is
distant.
2009-01-19 17:48:27 -04:00
John Wiegley
dc91fdeff2
Added argument to amount_t::value() for request a market value in terms of a
...
specific commodity.
2009-01-19 17:47:46 -04:00
John Wiegley
60f9748da1
Create an unrounded global amount variable 'one' for creating inverse price
...
mappings.
2009-01-19 16:24:06 -04:00
John Wiegley
0ec53e4a6c
Allow the environment variable LEDGER_DEBUG to enable debugging.
2009-01-19 16:23:17 -04:00
John Wiegley
3bea2b1181
Output newlines between entries using format strings, not hard-coded.
2009-01-14 00:32:37 -04:00
John Wiegley
97d7896069
Whitespace fix.
2009-01-14 00:32:13 -04:00
John Wiegley
93f884b5f2
The cleared or pending flag of a transaction overrides the flag for the entire
...
entry only if it is "more" cleared.
2009-01-14 00:32:02 -04:00
John Wiegley
c9959f2008
Added a missing call to _dup() in amount_t::in_place_round. Thanks to unit
...
testing!
2008-11-23 23:37:42 -04:00
John Wiegley
1921f01189
Change default precision extension back to 6, rather than rewriting all of the
...
unit tests. 6 was good enough.
2008-11-23 23:37:24 -04:00
John Wiegley
a1717b6dd5
Needed to port skanthak's last commit to the master branch's code base.
2008-11-23 23:37:01 -04:00
John Wiegley
c172281858
Abstracted precision extension constant, and added a note that precision must
...
be handled differently, since paying attention to places after the decimal is
not enough.
2008-11-23 19:15:32 -04:00
Sebastian Kanthak
7ce1c4e5a9
Fix --reconcile by terminating transaction list correctly
...
when a match is found.
2008-11-23 19:08:38 -04:00
John Wiegley
5d41388ff3
Corrected the way that scopes are found so that xact_t can also be found as an
...
item_t (which it also is).
2008-10-29 02:00:00 -06:00
John Wiegley
b5386b2534
Added code to recursively search for a price in a given commodity.
2008-09-25 13:59:01 -04:00
John Wiegley
6007e3cbfe
Did more restructing of commodity price histories, although the completed
...
find_price does not work yet.
2008-09-21 10:26:38 -04:00
John Wiegley
79a8fc5a87
Created several alternate 'value' methods to support the upcoming commodity
...
valuation changes.
2008-09-21 07:56:23 -04:00
John Wiegley
697f6a6bce
Began initial work to support specifying a series of commodities to -V.
2008-09-20 14:46:18 -04:00
John Wiegley
e914b476e9
Commented out some dead code.
2008-09-20 13:48:47 -04:00
John Wiegley
1bbb6933af
Cleaned up the way that commodity pricing is handled.
2008-09-20 13:48:36 -04:00
John Wiegley
0e95974360
Changed some of the transaction flags, since all must fit in 8 bits.
2008-09-19 08:31:17 -04:00
John Wiegley
eb425536d4
Renamed a variable to be more consistent.
2008-09-19 08:30:17 -04:00
John Wiegley
a374979aaa
Changed debug class ledger.textual.parse to just textual.parse.
2008-09-19 08:10:13 -04:00
John Wiegley
5b5d6ac0ce
Removed unneeded NULL argument.
2008-09-19 08:09:17 -04:00
John Wiegley
1edb531c05
Renamed XACT_BALANCE flag to XACT_MUST_BALANCE.
2008-09-19 08:08:28 -04:00
John Wiegley
e85a52b72b
Modified a debug class code.
2008-09-19 08:08:15 -04:00
John Wiegley
1c2944d829
When automatically associating lot details with a commodity, use only the
...
price (based on the cost of the transactions), don't automatically use the
date and the entry code -- since most people aren't going to be that specific
at the time of sale, it's causes confusion in certain cases.
2008-09-19 08:07:51 -04:00
John Wiegley
fdc7a4e4c5
Factored common parts of entry_t and xact_t into new item_t
2008-09-19 08:06:20 -04:00
John Wiegley
43ba0bb038
Corrected a harmless warning.
2008-09-19 06:55:07 -04:00
John Wiegley
e293132729
Changed a plain equality into a strcmp.
2008-09-18 11:42:43 -04:00
John Wiegley
e4be662c51
Don't try to parse a display predicate if none has been set.
2008-09-18 11:42:32 -04:00
John Wiegley
1fcf7b5fc1
Move handling of all commands to the value expression subsystem, rather than
...
handling them explicitly in main.cc.
2008-09-18 11:42:17 -04:00
John Wiegley
b9182bccdc
If a value expression lookup on an account object fails, defer to the current
...
session object. Transactions and entries already do this.
2008-09-18 11:34:22 -04:00
John Wiegley
bdc180ff9c
Don't use single code format characters anymore. Access to object details
...
will now always be done with "%(identifier)".
2008-09-18 11:25:56 -04:00
John Wiegley
1b083919c0
Restored the 'print' command.
2008-09-17 21:09:15 -04:00
John Wiegley
24e64c202e
Added the 'note' value expression identifier.
2008-09-17 21:08:54 -04:00
John Wiegley
41c33a2442
Restored --cleared, --pending, --uncleared, -X and -Y.
2008-09-16 05:05:23 -04:00
John Wiegley
660c40a6d3
Corrected several assertions which could occur when using unary operators and
...
unresolved identifiers.
2008-09-16 05:04:21 -04:00
John Wiegley
01aa3800fb
Fixes to the way that EXPR_PARSE_SINGLE behaves.
2008-09-15 02:37:04 -04:00
John Wiegley
50ee03e3f0
Fixed the way that nested caught exceptions are rethrown, and how value
...
expressions are displayed when errors are found in them.
2008-09-15 02:36:50 -04:00
John Wiegley
1624984981
If an entry is being parsed but yields all null-amount transactions,
...
completely ignore the entry. This is useful for supporting "safety" entries
whose only purpose is to assert the balance of account(s) at a certain point
in time.
2008-09-14 19:44:35 -04:00
John Wiegley
db9f891003
Added value expression parsing flag EXPR_PARSE_SINGLE, which means to read
...
only a single expression and then quit immediately. Useful for parsing
expressions that begin with a left parenthesis and are known to end at the
right parenthesis.
2008-09-14 19:44:35 -04:00
John Wiegley
53c6e826f1
Restored --format, --date-format (-y), and --input-date-format options.
2008-09-14 19:44:30 -04:00