Commit graph

71 commits

Author SHA1 Message Date
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
John Wiegley
6d020a9b0b format_t now handles escaped characters in input strings. 2008-09-14 19:40:26 -04:00
John Wiegley
62389888b6 The ledger::string type now uses size_type for a length parameter instead of
"const int", which is not portable.
2008-09-14 19:39:56 -04:00
John Wiegley
9a98beab38 Added 'code' value expression function for xacts and entries. 2008-09-14 19:39:26 -04:00
John Wiegley
7d1809cb15 Transactional assignments (i.e., confirmed balances) are working now. 2008-09-14 19:38:44 -04:00
John Wiegley
0135c28049 Added in_place_round method to all Ledger numerical types. 2008-09-14 19:36:55 -04:00
John Wiegley
06a5792212 Output balances when converting to strings, as this is needed by debugging
code sometimes.
2008-08-29 04:32:25 -04:00
John Wiegley
bbf4da9d9b Removed todo comments and dead code. 2008-08-17 05:19:51 -04:00
John Wiegley
b89fcfb54a Re-enabled the disabled expand_path routine. 2008-08-17 05:18:25 -04:00
John Wiegley
a1db45dca1 Removed more dead code. 2008-08-17 05:09:51 -04:00
John Wiegley
06bbe56701 Fixed an assertion. 2008-08-17 04:55:01 -04:00
John Wiegley
08488d4cd7 Removed more dead code and todo comments, and made it possible to stream
compiled value expressions.
2008-08-17 04:41:02 -04:00
John Wiegley
1c079630cf Removed more "pending" type comments. 2008-08-17 03:51:28 -04:00
John Wiegley
8da86ae078 Removed dead code. 2008-08-17 03:47:01 -04:00
John Wiegley
752eb99445 Removed all pending todos from the amount_t code. 2008-08-17 03:40:21 -04:00
John Wiegley
891d7b87c8 Removed some dead code and updated the binary streaming code for op_t and
value_t.
2008-08-17 03:15:57 -04:00
John Wiegley
0259ee32c8 Added a session_t::clean_all method, for clearing all xdata within a session. 2008-08-16 04:25:02 -04:00
John Wiegley
0b206e86ef Added a forward declaration for session_t. 2008-08-15 17:43:58 -04:00
John Wiegley
e18749dec9 If a comparison between amounts fails, fall back and try to compare
commodities instead.
2008-08-14 04:15:35 -04:00
John Wiegley
6432d7c594 Added back a lot of hacktastic logic from 2.6.1 that made the "bal" command
somewhat smart about how it interpreted certain options.  Beware, code, for
your days are not long-lived.
2008-08-14 04:14:48 -04:00
John Wiegley
2bff7565c1 Changed interval_t::start to interval_t::set_start, to be more clear about how
it differs from interval_t::first.
2008-08-14 04:14:02 -04:00
John Wiegley
ad02a482b6 Added the "depth" value expression function for accounts. 2008-08-14 04:13:18 -04:00
John Wiegley
b488d1d62f Re-enabled many more options, among them -n. 2008-08-14 03:30:03 -04:00
John Wiegley
c7c709cd0b Restored the -p, -b and -e reporting options. 2008-08-14 02:40:32 -04:00
John Wiegley
a50bab1865 Changed output_date_format to match 08-Aug-14 format. 2008-08-14 02:40:23 -04:00
John Wiegley
6a82e12ab4 get_amount should return the xdata value if the EXT_COMPOUND flag is on. 2008-08-14 02:40:09 -04:00
John Wiegley
450cdb2b6d If a transaction's entry has no journal pointer (and this can happen with
temporaries), reference session_t::current to get at the current report
pointer.
2008-08-14 02:39:43 -04:00
John Wiegley
7a6d416f3b Allow value_t::reduce() on any data type. 2008-08-14 02:39:21 -04:00
John Wiegley
6555f45c9d Moved a block of code from report to session, though it's still commented out. 2008-08-14 02:15:11 -04:00
John Wiegley
e10364e136 Corrected the formatting of second-lines in the register report. 2008-08-14 02:12:47 -04:00