summaryrefslogtreecommitdiff
path: root/src/post.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Added any() and all() value expression macrosJohn Wiegley2010-05-081-0/+48
| | | | | | | | | | | | | | | | | | | | any() matches an expression against every post in a transaction or account, and returns true if any of them are true. all() tests if all are true. For example: ledger -l 'account =~ /Expense/ & any(account =~ /MasterCard/)' reg This reports every posting affecting an Expense account (regex match), but only if some other posting in the same transaction affects the MasterCard account. Both functions also take a second boolean argument. If it is false, the "source" posting is not considered. For example: ledger -l 'any(/x/, false)' This matches any posting where a *different* posting in the same transaction contains the letter 'x'.
* Rewrite the "print" command as a custom functionJohn Wiegley2010-03-081-2/+2
| | | | | There ended up being too many corner cases for the generalized formatter to handle.
* Updated copyrights to 2003-2010John Wiegley2010-03-051-1/+1
|
* Some minor refactoring of the textual parserJohn Wiegley2010-02-051-0/+14
|
* Added actual_date() methods for itemsJohn Wiegley2010-02-051-0/+12
|
* Added historical support for single-letter valexprsJohn Wiegley2009-11-141-2/+26
|
* Moving the #include of unistring.h into format.hJohn Wiegley2009-11-101-1/+0
|
* Whitespace fixJohn Wiegley2009-11-101-4/+4
|
* Fixes to the value expression parser and evaluatorJohn Wiegley2009-11-101-18/+19
|
* account_amount() is now account().amountJohn Wiegley2009-11-101-37/+39
|
* XML reporting now works via the "xml" commandJohn Wiegley2009-11-091-0/+95
|
* Added support for Boost.Regex w/ ICUJohn Wiegley2009-11-071-1/+1
| | | | | This allows for correct searching of UTF-8 encoded strings, such as lower-case versions of Russian words to find mixed-case words.
* If a posting's amount is null, return 0LJohn Wiegley2009-11-051-0/+6
|
* 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)
* Added "reported posts" into account xdataJohn Wiegley2009-11-021-0/+6
| | | | | | | | | This is necessary because sometimes, a post from one account will get reported as though it were in another account (this happens with --budget, to show child account postings within their parent account). In that case, the account needs to remember which postings have been reported as being within it, so that it can add these amounts to its own total in the balance report.
* A posting's note includes its parent xact's noteJohn Wiegley2009-11-011-0/+11
|
* Removed most #if 0 blocks and callout commentsJohn Wiegley2009-10-311-2/+2
|
* Renamed two methods, for consistency's sakeJohn Wiegley2009-10-271-1/+1
|
* Made the id function available in post contextsJohn Wiegley2009-10-271-0/+22
|
* Fixed many compiler warnings from g++ 4.4John Wiegley2009-10-251-1/+2
|
* Restored --percent option, added baseline testJohn Wiegley2009-06-211-0/+2
|
* Restored pricesdb command and --pricesdb-format optionJohn Wiegley2009-06-181-0/+6
|
* Enabled use of pre-compiled headers by defaultJohn Wiegley2009-03-101-0/+2
|
* Changed the way that account balances are computedJohn Wiegley2009-03-061-2/+3
|
* Enriched the behavior of post_t::add_to_valueJohn Wiegley2009-03-051-3/+21
| | | | | The new behavior will be used in future by some pending topic branches I'm working on.
* Renamed some flags and members in post_tJohn Wiegley2009-03-051-10/+8
|
* Reduced the #include dependency tree to a minimumJohn Wiegley2009-03-041-2/+3
|
* Gather account details in a details_t structureJohn Wiegley2009-03-031-2/+2
|
* Added a new "account_amount" valexpr functionJohn Wiegley2009-03-031-0/+31
| | | | At the moment, it's only useful during parsing.
* Changed "priced" to "cost_calculated" for clarityJohn Wiegley2009-02-271-4/+4
|
* Fixed bugs relating to sign and rounding of costsJohn Wiegley2009-02-271-3/+9
|
* Fixed the way item state is parsed and managedJohn Wiegley2009-02-271-11/+0
|
* The -B, -G, -V reports now show rounding amountsJohn Wiegley2009-02-261-2/+10
| | | | | | | | | This way, if the running total is off by a penny or two due to rounding of one or more commodities in the account, the user will see it. This commit also reorganizes the testing code a bit, which I did after adding the ninth test series (ConfirmTests), to validate the new rounding code.
* Fix for sensitive compilation environments.Eugene Morozov2009-02-251-1/+1
|
* Output "@ AMOUNT" cost in the print reportJohn Wiegley2009-02-241-11/+24
|
* Switched from using POST_AUTO to ITEM_GENERATEDJohn Wiegley2009-02-241-6/+0
|
* The Great Renaming, Part IIJohn Wiegley2009-02-231-0/+336
The last commit did not contain the majority of changes because of a slight mishap. This contains the real changeset.