summaryrefslogtreecommitdiff
path: root/src/post.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix ledger xml output, remove ledger json commandJohann Klähn2013-03-081-28/+15
| | | | | | | | | | | | As the format used by property trees to represent valid JSON and that for valid XML is too different and given that there are more requests for valid XML output I decided to pursue a quick fix and remove the json command in favor of a working xml command. See bug #782, #909, recent discussion on mailing list. JSON support is postponed until I or someone else finds time to work on this or the python bindings are more stable.
* Bump copyright information to 2013John Wiegley2013-02-181-1/+1
|
* Switched to Boost.PropertyTree for XML generationJohn Wiegley2012-05-181-59/+34
|
* Switch to using Boost.FormatJohn Wiegley2012-05-141-3/+3
|
* Whitespace fixJohn Wiegley2012-04-041-16/+13
|
* Never output calculate commodity valuation expressionsJohn Wiegley2012-03-201-0/+1
|
* Access to checkin/checkout of timelog entriesJohn Wiegley2012-03-131-1/+12
|
* Added "price" value expression for postsJohn Wiegley2012-03-071-0/+11
|
* Added parsing support for the many value directivesJohn Wiegley2012-03-071-0/+38
|
* Guarded a call to add_or_set_valueJohn Wiegley2012-03-051-1/+2
|
* Increased file copyrights to 2012John Wiegley2012-02-291-1/+1
|
* Renamed actual/effective dates to primary/auxiliaryJohn Wiegley2012-02-281-12/+12
|
* The "id" of an item now maps to its UUIDJohn Wiegley2012-02-271-10/+0
|
* Fixed many Clang type conversion warnings with static_castJohn Wiegley2012-02-171-3/+3
|
* Fixes for variable shadowing (21/28)John Wiegley2012-02-171-2/+2
|
* Fixes for variable shadowing (20/28)John Wiegley2012-02-171-3/+3
|
* Do not evaluate strings as booleansJohn Wiegley2012-02-111-2/+2
|
* Cleanup whitespaceJohn Wiegley2011-08-181-2/+2
|
* Whitespace correctionsJohn Wiegley2011-02-101-5/+5
|
* has_tag and get_tag now take an 'inherit' parameterJohn Wiegley2010-06-181-8/+10
|
* Individual postings may each have their own payeeJohn Wiegley2010-06-171-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a posting has the metadata field "Payee" set to a string, that will be used as the payee name for that posting. This affects the register report, the payees report, and the --by-payee option. This is useful because sometimes I send, say, 4 checks at a time to my bank. So on my bank statement, this is all just one amount: 2010-06-17 Sample Assets:Bank $400.00 Income:Check1 $-100.00 Income:Check2 $-100.00 Income:Check3 $-100.00 Income:Check4 $-100.00 Though it's important that the Assets:Bank posting be a single posting of $400 value, I'd like for income reports to show whom each check came from. Now I can say: 2010-06-17 Sample Assets:Bank $400.00 Income:Check1 $-100.00 ; Payee: Person One Income:Check2 $-100.00 ; Payee: Person Two Income:Check3 $-100.00 ; Payee: Person Three Income:Check4 $-100.00 ; Payee: Person Four When I report this, it appears as: 10-Jun-17 Sample Assets:Bank $400.00 $400.00 Person One Income:Check1 $-100.00 $300.00 Person Two Income:Check2 $-100.00 $200.00 Person Three Income:Check3 $-100.00 $100.00 Person Four Income:Check4 $-100.00 0 This shows that they are all in the same transaction (which is why the date is not repeated), but they have different payees.
* Report error context in expressions more preciselyJohn Wiegley2010-06-131-4/+8
|
* Completely reworked argument passing in expressionsJohn Wiegley2010-06-131-53/+45
|
* Expression evaluations now have a "type context"John Wiegley2010-06-131-28/+12
| | | | | | | | | Thus, an expression can know if the context in which it's being evaluated requires a string, and if so, determine it's output accordingly. For example: account ; returns the full name of the posting's account account.total ; here the context is SCOPE, so account is an obj
* Added a new scope_value() inline helper functionJohn Wiegley2010-06-131-2/+2
|
* account(NAME) function can lookup account objectsJohn Wiegley2010-06-131-1/+16
| | | | | | For example, just the word "account" returns the name of the current posting's account, but account("Expenses:Food") returns the actual account object, so that it's total may be accessed.
* Improved value expression function 'commodity'John Wiegley2010-06-121-8/+15
| | | | | | Without arguments -- and in a posting -- it is equivalent to "commodity(amount)". Otherwise, it returns the commodity symbol of its argument.
* Store metadata values as value_t instead of stringJohn Wiegley2010-06-121-6/+6
|
* Untabified all source filesJohn Wiegley2010-06-111-68/+68
|
* Fixed interaction with -V/X and grouped postingsJohn Wiegley2010-06-091-0/+17
| | | | | | | | | | With -s, -M/Y/D, -n, and a few other flags, postings get "grouped" into meta-transactions that contain more postings than before. In all these cases, -V use the date of the *earliest* posting in that group, which makes little sense and caused breakages with -J. It now uses the latest date. Fixes #197 / 68EAF363-D0FE-4127-866E-A5AEBACB65D6
* Empty notes and tags now return null valuesJohn Wiegley2010-05-301-4/+8
|
* Created new valexpr variable display_accountJohn Wiegley2010-05-221-8/+24
| | | | | | | | | Where display_account might be '(Expenses:Food)', account will always be 'Expenses:Food'. account is now used by all matching and query operations, while display_account is used in the various report outputs (besides balance, which never distinguished virtual accounts). Fixes F2832452-4521-49A3-B854-F4E12CC4D82E
* Changed the report generated by the csv commandJohn Wiegley2010-05-221-2/+12
| | | | | | | | | | | Fields are now: Date,Code,Payee,Account,Commodity,Total,State,Note Instead of outputting amounts potentially as $1,000.00 (which was an error anyway), the output is now: $,1000.00. This makes the commodity available in a separate field, and removes display of thousands markers. Also, european formatting is always off.
* Added account_id and xact_id valexpr vars for postsJohn Wiegley2010-05-181-0/+36
| | | | | account_id is the "whicheth" number for that posting within its account. The xact_id is within its transaction.
* 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
|