summaryrefslogtreecommitdiff
path: root/src/report.cc
Commit message (Collapse)AuthorAgeFilesLines
* When --end is used, set a "terminus" dateJohn Wiegley2009-06-161-0/+8
| | | | | | | This means that final balance valuations (with -V or -X) will be done in terms of the date given to --end, rather than based on the current day. Fixes 647D5DB9-DBBB-47C8-80CE-F3F70E3B0253
* Move amount colorization deeper into the coreJohn Wiegley2009-06-161-3/+4
| | | | | | | | This is necessary in order to redden negative amounts correctly under all circumstances, such as component amounts of a multi-commodity balance. Fixes 727B2DF8-A2A1-4716-9C15-547F20D5F933
* Added new debug option --optionsJohn Wiegley2009-06-021-14/+19
| | | | | This reports which options are in place before invoking a command, and where exactly each option value came from.
* Enabled use of pre-compiled headers by defaultJohn Wiegley2009-03-101-0/+2
|
* Revised the ways statistics are computedJohn Wiegley2009-03-061-2/+4
| | | | | | | It is no longer done in calc_posts, but recursively on each account. This allows value expressions to ask statistical questions, like "earliest cleared posting?" (TBD) from any specific account, computed lazily.
* Implemented --unround using value expressionsJohn Wiegley2009-03-061-0/+7
|
* Removed the --totals optionJohn Wiegley2009-03-051-1/+0
|
* Reduced the #include dependency tree to a minimumJohn Wiegley2009-03-041-5/+18
|
* Normalized how account totals are calculatedJohn Wiegley2009-03-031-18/+4
|
* Allow special %{} formatting sequenceJohn Wiegley2009-03-031-2/+2
| | | | | | | | | | | | | | | Although %(amount) inserts an item's amount, it only does exactly that. There is no special consideration like stripping of lot details, or reduction to the base commodity, etc. For those things, and to make sure it was display in red if negative, the canonical form would be: %(ansify_if(justify(scrub(amount), 12, -1, true), red if amount < 0)) You can now use the special %{} form as an alternate to this: %12{amount, red if amount < 0} The two expand to the same underlying expression.
* Made all the ANSI color names into valexpr namesJohn Wiegley2009-03-031-0/+67
|
* Moved fn_false to be a non-member functionJohn Wiegley2009-03-031-1/+4
|
* Added a "null" value for value expressionsJohn Wiegley2009-03-031-0/+9
|
* Added a "show" report query termJohn Wiegley2009-03-021-3/+20
| | | | | Everything beyond the show modifies the --display predicate, and everything before modifies the --limit predicate.
* Changed how comments are output to be more logicalJohn Wiegley2009-03-011-0/+2
|
* The generate report now implies --actualJohn Wiegley2009-02-271-0/+1
|
* Allow --head to limit the entries generate createsJohn Wiegley2009-02-271-1/+3
|
* Added --lots-actual, to not print calc'd detailsJohn Wiegley2009-02-271-1/+1
|
* Added generate command, --seed, and GenerateTestsJohn Wiegley2009-02-271-0/+16
|
* Fixed bugs relating to sign and rounding of costsJohn Wiegley2009-02-271-0/+8
|
* Added an --unround option, to show full precisionJohn Wiegley2009-02-271-0/+1
|
* Changed the "truncate" valexpr func to "truncated"John Wiegley2009-02-271-3/+3
|
* Changed --exchange's short option from -x to -XJohn Wiegley2009-02-251-3/+3
|
* Added a new --depth optionJohn Wiegley2009-02-251-0/+1
|
* Added a new level of Python integrationJohn Wiegley2009-02-241-0/+17
|
* Removed the largely useless --performance optionJohn Wiegley2009-02-241-3/+1
|
* The Great Renaming, Part IIJohn Wiegley2009-02-231-36/+33
| | | | | The last commit did not contain the majority of changes because of a slight mishap. This contains the real changeset.
* rounded() and quantity() act on the first valueJohn Wiegley2009-02-231-3/+4
|
* Added get_at and is_seq valexpr functionsJohn Wiegley2009-02-231-2/+36
| | | | These are for dealing with sequences.
* Many fixes to both --market and --exchangeJohn Wiegley2009-02-231-3/+7
|
* Many fixes to --market and --exchangeJohn Wiegley2009-02-221-7/+3
| | | | Also, --exchange now accepted multiple, comma-separated commodities.
* --exchange option now accepts multiple commoditiesJohn Wiegley2009-02-221-16/+28
| | | | They must be separated by a comma, and all whitespace is ignored.
* Added --exchange (-x) optionJohn Wiegley2009-02-221-16/+18
| | | | | | | This is like -V, except it lets you specify the goal commodity to report in terms of, for example: reg -x CAD
* Fixed the way values are justified for printingJohn Wiegley2009-02-221-9/+10
|
* Changed --colors to --color, to match GitJohn Wiegley2009-02-221-2/+2
|
* Removed unused --totals optionJohn Wiegley2009-02-221-1/+0
| | | | This option was for outputting <total> elements in 2.x's XML output.
* Added a new --colors option, for terminal funJohn Wiegley2009-02-211-2/+30
| | | | | | | | | The following colors are applied in the balance and register reports: GREEN To a date, if it occurs in the future BOLD If a payee name relates to an uncleared entry BLUE For account names RED For negative values
* Added a new --raw option, for use with printJohn Wiegley2009-02-211-2/+2
|
* Removed an unused class: format_entriesJohn Wiegley2009-02-211-1/+2
|
* Use more general scrub valexpr function in formatsJohn Wiegley2009-02-211-1/+8
|
* Create a new interactive_t helper classJohn Wiegley2009-02-211-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Made --leeway a synonym for --price-expJohn Wiegley2009-02-211-0/+1
|
* Added --start-of-week option, used with --weeklyJohn Wiegley2009-02-211-0/+1
| | | | | For example, --start-of-week=monday can be used to report weeks that begin on Mondays.
* Handle reporting widths that are too smallJohn Wiegley2009-02-211-1/+2
|
* Added a new --exact optionJohn Wiegley2009-02-211-0/+1
| | | | | | | | | The purpose of this option is that usually when you do a --monthly periodic report, you see dates ranges from the first day of each month, to the last day. With --exact, the first day of each range will be the date of the first transaction found in that range, and likewise with the end of the range. Essentially it "contracts" the reported period dates to reflect the exact begin and end dates.
* Restored --forecast, now also --forecast-whileJohn Wiegley2009-02-211-1/+1
|
* Restored the --base optionJohn Wiegley2009-02-201-1/+5
|
* Added more option baseline tests, enabled --dowJohn Wiegley2009-02-201-1/+1
|
* Removed unused --cache optionJohn Wiegley2009-02-201-2/+2
|
* Restored the --basis optionJohn Wiegley2009-02-201-6/+18
|