summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* If a type context exists, confirm the result matchesJohn Wiegley2010-06-132-5/+19
|
* Expression evaluations now have a "type context"John Wiegley2010-06-134-38/+54
| | | | | | | | | 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-135-12/+12
|
* Added support for assert, check and expr directivesJohn Wiegley2010-06-133-18/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Removed an unused functionJohn Wiegley2010-06-131-7/+0
|
* Automated xacts may now contain "deferred tags"John Wiegley2010-06-135-12/+64
| | | | | | | | | | | | | | | | 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.
* account_t::add_post resets family_details.gatheredJohn Wiegley2010-06-132-3/+15
|
* account(NAME) function can lookup account objectsJohn Wiegley2010-06-134-6/+61
| | | | | | 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.
* Option --input-date-format adds to candidate listJohn Wiegley2010-06-131-2/+2
|
* Reformatted a commentJohn Wiegley2010-06-131-3/+3
|
* Fixed a spelling errorJohn Wiegley2010-06-131-3/+1
|
* Minor whitespace fixJohn Wiegley2010-06-131-3/+3
|
* Add support for typed metadataJohn Wiegley2010-06-126-23/+49
| | | | | | | | | | The metadata construct 'Key: Value' is now just a special case for 'Key:: "Value"'. Another after a :: in metadata setting is parsed as a full value expression and typed as such. For example: ; Key:: $400 + $500 ledger -l 'tag("Key") < $1000'
* Improved value expression function 'commodity'John Wiegley2010-06-123-8/+24
| | | | | | 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-128-48/+50
|
* The --anon option now randomizes its effectJohn Wiegley2010-06-122-6/+19
|
* Include serialize_ptr_deque, for Boost.SerializationJohn Wiegley2010-06-121-1/+1
|
* Untabified all source filesJohn Wiegley2010-06-11110-5397/+5397
|
* Scrub account totals before applying --percentJohn Wiegley2010-06-111-1/+2
|
* Several corrections to transaction finalizationJohn Wiegley2010-06-101-5/+13
|
* Use ptr_deque for value_t::sequence_tJohn Wiegley2010-06-104-7/+12
| | | | | | | | | This is to work around undefined behavior according to the Standard, [lib.res.on.functions]/2: "In particular, the effects are undefined in the following cases: [..] - if an incomplete type (3.9) is used as a template argument when instantiating a template component."
* gain/loss posting based on a virtual should also beJohn Wiegley2010-06-101-1/+6
|
* Fixed the "generate" commandJohn Wiegley2010-06-104-17/+11
|
* Allow fixated costs, as well as pricesJohn Wiegley2010-06-103-6/+24
| | | | | | | | | You can now establish a fixated price automatically by way of a fixated cost. The syntax for this is: 2009/11/01 Sample Assets 1 apple @ =$0.10 Equity
* Increase item_t's flags to 16-bitJohn Wiegley2010-06-101-4/+4
|
* Corrected behavior of "draft" argument parserJohn Wiegley2010-06-101-37/+36
|
* Corrected some math used by the budget commandJohn Wiegley2010-06-101-5/+5
|
* Fix to budgeting when fixed dates are involvedJohn Wiegley2010-06-101-2/+1
|
* Errors involving value objects provide more contextJohn Wiegley2010-06-102-9/+45
|
* Corrections to the way error strings are generatedJohn Wiegley2010-06-106-6/+13
|
* The --anon option now anonymizes commoditiesJohn Wiegley2010-06-093-11/+69
| | | | Fixes #227 / 1C90D8AF-830E-43C2-A5B7-D382F68EBDE3
* New display flag AMOUNT_PRINT_ELIDE_COMMODITY_QUOTESJohn Wiegley2010-06-095-7/+16
| | | | | | | | This is used by reports like register and balance so that separated commodities without spaces in them needed be surrounded by quotes. It will still occur in most other places. Fixes #200 / F82CF11F-BFD9-4512-A562-202B04B68051
* In value_t::print, pass along display flagsJohn Wiegley2010-06-091-1/+1
|
* Fixed minor rounding issue with priced commoditiesJohn Wiegley2010-06-091-4/+6
|
* Insert <Rounding> posts within the affected xactJohn Wiegley2010-06-091-11/+7
|
* Fixed interaction with -V/X and grouped postingsJohn Wiegley2010-06-096-56/+103
| | | | | | | | | | 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
* Revert "Compute a posting's cost from an annotated price"John Wiegley2010-06-081-10/+0
| | | | This reverts commit ae8ab8106218167036ef386159450b56c328f1b9.
* A further simplification of -V and -XJohn Wiegley2010-06-0712-57/+53
| | | | | | | | With -X COMM, all values are computed in terms of COMM, regardless. With -V, only secondary commodities will ever be computed, never primaries. Further, if a secondary commodities has an associated price, the valuation is done in terms of that price's commodity.
* Compute a posting's cost from an annotated priceJohn Wiegley2010-06-071-0/+10
|
* Fixed the way prices and costs are print'dJohn Wiegley2010-06-075-28/+28
|
* amount_t::print and value_t::print now use flagsJohn Wiegley2010-06-078-44/+52
|
* Minor optimization of how non --empty is handledJohn Wiegley2010-06-076-39/+65
|
* Reworked the way that <Rounding> entries are shownJohn Wiegley2010-06-066-129/+202
| | | | Fixes #188 / 53BCED29-F3B9-4E02-9A35-6C739ABB9662
* Corrected implementation of --percentJohn Wiegley2010-06-061-1/+1
|
* Made lookup of an account's "cost" a calc errorJohn Wiegley2010-06-061-0/+6
|
* Simplified some debug codeJohn Wiegley2010-06-061-4/+2
|
* Corrected a typename visibility issueJohn Wiegley2010-06-061-0/+2
|
* Enabled timers and logging in NDEBUG buildsJohn Wiegley2010-06-051-3/+3
|
* Made "expr" command a synonym for "parse"John Wiegley2010-06-051-0/+2
|
* Value expression sequences are now comparableJohn Wiegley2010-06-053-10/+32
| | | | Fixes #228 / ED9388D7-E523-40EB-841B-9AE9BAA70329