summaryrefslogtreecommitdiff
path: root/src/xact.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Updated copyrights to 2003-2010John Wiegley2010-03-051-1/+1
|
* Many improvements to Ledger's Python bindingsJohn Wiegley2009-11-191-6/+7
|
* Changed a use of balance_error to amount_errorJohn Wiegley2009-11-141-1/+1
|
* Memoize results from the fast predicate matcherJohn Wiegley2009-11-141-1/+16
| | | | | This gains another 15% for the parser, again with a very simple change that has no impact if the fast predicate matcher fails to work.
* Spot optimization for simple automated xact exprsJohn Wiegley2009-11-141-2/+65
| | | | | | This reduces parsing time in the optimized build by 25%, and was a safe, easy patch. If the "quick predicate evaluator" fails, we disable it from that point on go back to what the standard code does.
* Added has_xdata() methods for journal_t and xact_tJohn Wiegley2009-11-121-0/+9
|
* Transactions now verified after applying auto xactsJohn Wiegley2009-11-111-0/+57
| | | | | This way you cannot violate the balancing rules, not even by adding a stray posting via an automated transaction.
* Automated postings defer amount expression calculationJohn Wiegley2009-11-111-18/+29
| | | | | | | | | | | | | | | | | This allows for value expressions to be used which reference the incoming posting, for example: = Income:Clients: (Liabilities:Taxes:VAT1) (floor(amount) * 1) (Liabilities:Taxes:VAT2) 0.19 2009/07/27 * Invoice Assets:Bank:Checking $1,190.45 Income:Clients:ACME_Inc The automated posting for VAT1 will use the floored amount multiplied by a factor, while the posting for VAT2 multiples the whole amount as before.
* Fixed automated posts not appearing in bal reportsJohn Wiegley2009-11-101-0/+1
|
* Fix for automated amount multipliers and null amountsJohn Wiegley2009-11-091-1/+3
|
* XML reporting now works via the "xml" commandJohn Wiegley2009-11-091-0/+59
|
* Renamed journal_t::basket to bucketJohn Wiegley2009-11-071-2/+2
|
* Report sought magnitude when balancing errors occurJohn Wiegley2009-11-051-15/+17
|
* Moved xdata clearing code into each type properJohn Wiegley2009-11-051-0/+7
|
* Segregated symbols into 5 separate namespacesJohn Wiegley2009-11-041-2/+6
| | | | | | | | | | | | | | | | | | | | | The different namespaces are: Function Value expression functions, which receive a "context" Option Command-line options Precommand Commands which are invoked before reading the journal Command Commands which are invoked after reading the journal Directive Directives that occur at column 0 in a data file This greatly eases the ability for Python uses to add intercept hooks to change how the basic Ledger module functions. An example of what should be possible soon: import ledger def my_foo_handler(value): print "--foo received:", value ledger.add_handler(ledger.Option, "foo=", my_foo_handler)
* Fixed copy constructors for transactionsJohn Wiegley2009-11-011-2/+2
|
* Removed excessive validity check from xact_t::validJohn Wiegley2009-11-011-4/+0
|
* Fix to xact_t::valid()John Wiegley2009-11-011-1/+1
|
* Removed most #if 0 blocks and callout commentsJohn Wiegley2009-10-311-4/+0
|
* Add a position_t object for tracking item positionsJohn Wiegley2009-10-301-2/+2
| | | | It is also optional, which is useful for generated items.
* Added some additional assertion tests re: tempsJohn Wiegley2009-10-281-4/+11
|
* Support balancing of postings with integer amountsJohn Wiegley2009-10-271-1/+6
|
* Use the WRITTEN date format for idstringsJohn Wiegley2009-10-271-1/+1
|
* Redid the way temporaries are handled in filteringJohn Wiegley2009-10-271-1/+1
|
* Made the id function available in post contextsJohn Wiegley2009-10-271-19/+35
|
* New valexpr functions: id, idstring, magnitudeJohn Wiegley2009-10-251-0/+39
| | | | | | id returns a unique SHA1 id of a transaction. idstring is the string that the SHA1 is based on. magnitude is the sum of the positive side of a transaction.
* Split commodity.h/cc into three filesJohn Wiegley2009-06-241-3/+4
| | | | | | commodity.h - code for commodity_t annotate.h - commodity annotations pool.h - commodity pool management
* Fixes to the 'xact' command (used to be 'entry')John Wiegley2009-06-191-2/+8
|
* Enabled use of pre-compiled headers by defaultJohn Wiegley2009-03-101-0/+2
|
* Changed the way that account balances are computedJohn Wiegley2009-03-061-10/+6
|
* Reduced the #include dependency tree to a minimumJohn Wiegley2009-03-041-2/+2
|
* Cured several harmless compiler warningsJohn Wiegley2009-03-041-0/+4
|
* Changed many assert() calls to VERIFY()John Wiegley2009-03-041-1/+1
|
* Gather account details in a details_t structureJohn Wiegley2009-03-031-2/+4
|
* Corrected warnings g++-4.3.3 was complaining aboutJohn Wiegley2009-02-281-1/+2
|
* Changed "priced" to "cost_calculated" for clarityJohn Wiegley2009-02-271-3/+3
|
* Fixed bugs relating to sign and rounding of costsJohn Wiegley2009-02-271-7/+13
|
* Fixed the way item state is parsed and managedJohn Wiegley2009-02-271-16/+7
|
* Print more context if an automated xact failsJohn Wiegley2009-02-261-0/+9
|
* Marked all strings needing internationalizationJohn Wiegley2009-02-251-6/+6
| | | | | | | | | | | | | | | | These strings are now collected automagically in the file po/ledger.pot. If you'd like to produce a translation, just run this command after building Ledger: msginit -l LOCALE -o LANG.po -i po/ledger.pot Where LOCALE is a string like de or en_GB, and LANG is a short descriptive word for your language. Then send me this .po file so I can commit it to the Ledger sources (alternatively, you could maintain the file in a fork on GitHub), and setup the build script to format and install your new message catalog during a "make install".
* Fixed an issue involving costs and reduced valuesJohn Wiegley2009-02-241-64/+74
|
* Improved the way that entries are balancedJohn Wiegley2009-02-241-24/+59
|
* Switched from using POST_AUTO to ITEM_GENERATEDJohn Wiegley2009-02-241-2/+3
|
* Fixed a minor bug in handling of automated xactsJohn Wiegley2009-02-231-1/+1
| | | | | There was a if statement with an inverse boolean meaning, which caused some automated transaction postings to have a null amount.
* The Great Renaming, Part IIJohn Wiegley2009-02-231-215/+303
| | | | | The last commit did not contain the majority of changes because of a slight mishap. This contains the real changeset.
* Many fixes to both --market and --exchangeJohn Wiegley2009-02-231-0/+3
|
* Added --exchange (-x) optionJohn Wiegley2009-02-221-0/+6
| | | | | | | This is like -V, except it lets you specify the goal commodity to report in terms of, for example: reg -x CAD
* Create a new interactive_t helper classJohn Wiegley2009-02-211-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this class is much like Emacs' (interactive) form: it allows a value expression function to declare exactly how many arguments, and of what type, it intends to receive. It then offers type-safe access to theese arguments in a consistent manner. An example value expression function definition in C++: value_t fn_foo(call_scope_t& scope) { // We expect a string, an integer, and an optional date interactive_t args(scope, "sl&d"); std::cout << "String = " << args.get<string>(0) << "Integer = " << args.get<long>(1) << std::endl; if (args.has(2)) // was a date provided? std::cout << "Date = " << args.get<date_t>(2) << std::endl; return NULL_VALUE; } There is also an in_context_t<T> template, which finds the context type T in the current scope hierarchy. The in_context_t then also acts as a smart pointer to reference this context object, in addition to serving the same duty as interactive_t. This combination of intent is solely for the sake of brevity. value_t fn_bar(call_scope_t& scope) { in_context_t<account_t> env(scope, "sl&d"); std::cout << "Account name = " << env->fullname() << "String arg = " << env.get<string>(0) << std::endl; return NULL_VALUE; } As you can see here, 'env' acts as a smart pointer to the required context, and an object to extract the typed arguments.
* If a transaction's total is null, return 0 insteadJohn Wiegley2009-02-191-1/+1
|
* Added a "commodity" valexpr variable for xactsJohn Wiegley2009-02-161-0/+6
|