summaryrefslogtreecommitdiff
path: root/src/xact.h
Commit message (Collapse)AuthorAgeFilesLines
* Implement the "tag" metadata directiveJohn Wiegley2012-02-271-13/+3
|
* The "id" of an item now maps to its UUIDJohn Wiegley2012-02-271-3/+0
|
* Cleanup whitespaceJohn Wiegley2011-08-181-1/+1
|
* Scopes can now provide a description of themselvesJohn Wiegley2010-06-241-0/+30
| | | | | | This isn't being used yet, but it likely will to improve the information presented to users if their value expressions fail to compile or evaluate.
* Revised how Ledger handles the "current year"John Wiegley2010-06-141-4/+2
| | | | | Now when the Y directive sets the current year for a region, it affects everything, as if the clock really were set back to that year.
* Added support for assert, check and expr directivesJohn Wiegley2010-06-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These can occur in many places: ; Within an automated transaction, the assert is evaluated every time ; a posting is matched, with the expression context set to the ; matching posting. = /Food/ assert account("Expenses:Food").total >= $100 2010-06-12 Sample Expenses:Food $100 Assets:Checking ; At file scope, the expression is evaluated with "global" scope. assert account("Expenses:Food").total == $100 ; At the top of a transction, the assertion's scope is the ; transaction. After a posting, the scope is that posting. Note ; however that account totals are only adjusted after successful ; parsing of a transaction, which means that all the assertions below ; are true, even though it appears as though the middle posting should ; affect the total immediately (which is not the case). 2010-06-12 Sample 2 assert account("Expenses:Food").total == $100 Expenses:Food $50 assert account("Expenses:Food").total == $100 Assets:Checking assert account("Expenses:Food").total == $100
* Automated xacts may now contain "deferred tags"John Wiegley2010-06-131-1/+27
| | | | | | | | | | | | | | | | For example, consider the following automated transaction: = /Food/ ; Next Date:: date + 10 (Expenses:Tax) 1.00 ; Next Date:: date + 20 This will add a metadata field named 'Next Date' to the _matching posting_, with a value that is 10 days later than that posting. It will also generate a new posting for that transaction, whose amount is the same as the matching posting. Further, it will add a 'Next Date' metadata tag to the _generated posting_ whose value is 20 days later than the date of the matching posting.
* Untabified all source filesJohn Wiegley2010-06-111-4/+4
|
* Updated copyrights to 2003-2010John Wiegley2010-03-051-1/+1
|
* Memoize results from the fast predicate matcherJohn Wiegley2009-11-141-0/+2
| | | | | 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-3/+5
| | | | | | 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/+1
|
* Transactions now verified after applying auto xactsJohn Wiegley2009-11-111-1/+2
| | | | | This way you cannot violate the balancing rules, not even by adding a stray posting via an automated transaction.
* Did away with the "finalizer" abstractionJohn Wiegley2009-11-111-70/+0
| | | | | This was from an earlier time, when it was intended to be used by Python. But it's not needed anymore.
* Automated postings defer amount expression calculationJohn Wiegley2009-11-111-9/+9
| | | | | | | | | | | | | | | | | 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.
* XML reporting now works via the "xml" commandJohn Wiegley2009-11-091-0/+2
|
* Redesigned the expr_t, predicate_t, query_t classesJohn Wiegley2009-11-091-3/+3
|
* Removed a bunch of empty commentsJohn Wiegley2009-11-081-39/+0
|
* Report sought magnitude when balancing errors occurJohn Wiegley2009-11-051-1/+2
|
* Moved xdata clearing code into each type properJohn Wiegley2009-11-051-0/+3
|
* Transactions, etc., are now accessed by iteratorsJohn Wiegley2009-11-051-0/+7
|
* Segregated symbols into 5 separate namespacesJohn Wiegley2009-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | 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)
* Whitespace fixJohn Wiegley2009-11-041-5/+5
|
* Whitespace fixesJohn Wiegley2009-11-011-1/+0
|
* Fix to xact_t::valid()John Wiegley2009-11-011-12/+3
|
* Removed most #if 0 blocks and callout commentsJohn Wiegley2009-10-311-2/+0
|
* Added serialization methods for most typeJohn Wiegley2009-10-301-0/+67
| | | | | This allows journal_t objects to be completed serialized to disk and deserialized.
* Removed erroneous throw specifier from period_xact_tJohn Wiegley2009-10-301-1/+1
|
* Made the id function available in post contextsJohn Wiegley2009-10-271-0/+4
|
* Temporarily stubbed out an inaccurate assertJohn Wiegley2009-06-151-1/+7
|
* First iteration of the new date_interval_t rewriteJohn Wiegley2009-03-151-3/+3
|
* Reduced the #include dependency tree to a minimumJohn Wiegley2009-03-041-2/+5
|
* Fixed the way item state is parsed and managedJohn Wiegley2009-02-271-2/+0
|
* The Great Renaming, Part IIJohn Wiegley2009-02-231-131/+178
| | | | | 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-6/+0
|
* Added xact_t::count memberJohn Wiegley2009-02-151-1/+4
| | | | | | This allows reports to access the "whicheth" index of the reported transaction. It's used mainly by the --average report, which divides the running total by this count to get the arithmetic mean.
* xact metadata searches get passed up to the entryJohn Wiegley2009-02-141-0/+8
| | | | | | That is, if a metadata tag cannot be found in a transaction, look in the parent entry to see if it was set there. Transactions "inherit" notational details from their entries.
* Sorting expr now uses "-" to indicate descendingJohn Wiegley2009-02-121-3/+4
| | | | | For example: -S payee,-date sorts 1) ascending by payee, then 2) descending by date.
* Re-enabled some code, and removed a bunch of deadwood.John Wiegley2009-02-121-1/+1
|
* Was failing to copy over the xact's assigned_amount when copy constructing.John Wiegley2009-02-091-0/+1
|
* Use the report's amount_expr everywhere that computes an xact's amount.John Wiegley2009-02-091-1/+1
|
* Removed the nearly unknown --descend and --descend-if options.John Wiegley2009-02-061-24/+0
|
* Largely removed all of Ledger's use of global variables, for the REPL's sake.John Wiegley2009-02-041-2/+2
|
* Simplified the textual parser, and improved metadata support.John Wiegley2009-02-041-9/+0
|
* Removed unneeded member variables.John Wiegley2009-02-041-3/+1
|
* Don't store the amount expression object in transactions.John Wiegley2009-02-031-0/+6
| | | | This is unnecessary since binary caching is no longer being used.
* Added documentation stubs for all include files and classes.John Wiegley2009-01-311-0/+19
|
* Stopped using the generic "unsigned int" in favor of more specific types.John Wiegley2009-01-291-7/+7
|
* Increased copyright range to include 2009.John Wiegley2009-01-201-1/+1
|
* Changed some of the transaction flags, since all must fit in 8 bits.John Wiegley2008-09-191-4/+4
|