Commit graph

1700 commits

Author SHA1 Message Date
John Wiegley
1aeb5e5997 acprep now uses ccache for --devel if available 2009-02-16 03:16:12 -04:00
John Wiegley
b5a972d1a0 The -n option for bal command is working again
The fix was that when appending new predicates, enclosed both sides of
the AND with parentheses.
2009-02-16 02:51:09 -04:00
John Wiegley
e3b40f5bb6 Fixed how subtotal date ranges are computed 2009-02-16 02:31:21 -04:00
John Wiegley
4dbd124e22 Revert "Propagate xact effective date in two places"
This reverts commit 17a0ab8407.
2009-02-16 02:16:34 -04:00
John Wiegley
17a0ab8407 Propagate xact effective date in two places 2009-02-16 01:19:59 -04:00
John Wiegley
be208ef260 Report collapsed xacts using earliest date 2009-02-16 01:14:23 -04:00
John Wiegley
f8681e482e Print <POINTER> if value_t::is_pointer() 2009-02-16 01:11:31 -04:00
Drew Raines
6ccc466a08 Move tags to xacts instead of entries. 2009-02-15 23:27:33 -04:00
John Wiegley
8c2a70e197 Made several of the filters more context aware
This resolves certain issues where value expressions were not being
looked up within their full context.
2009-02-15 23:00:16 -04:00
John Wiegley
14ffc2b31a Don't apply all filters for account-wise reports
This creates its own problems; instead, only most are used.
2009-02-15 22:57:23 -04:00
John Wiegley
e32129b25c Provide a "depth" variable for xacts 2009-02-15 22:36:12 -04:00
John Wiegley
e8c90ef96f If an account's "total" is empty, return 0 2009-02-15 22:34:10 -04:00
John Wiegley
503a96034e Added account(_base) accessors to account_t 2009-02-15 21:48:22 -04:00
John Wiegley
a64a069a77 Print stripped amounts in the print report 2009-02-15 21:27:28 -04:00
John Wiegley
780ce4a5d0 Normalized handling of several report options 2009-02-15 21:14:54 -04:00
John Wiegley
484b498c14 Re-enabled the --format (-F) option 2009-02-15 21:08:36 -04:00
John Wiegley
e861c312ac The "xact" variable now returns null for accounts 2009-02-15 21:05:59 -04:00
John Wiegley
bfa6a643a1 Improved handling of --empty option
For example, in period reports null transactions are only generated for
empty periods if --empty is used.  Otherwise, the presence of such
transactions can get confusing.
2009-02-15 20:59:13 -04:00
John Wiegley
78e57ac4cf item_predicate now operates on scope_t
This means item_predicate is no longer a template.
2009-02-15 20:56:48 -04:00
John Wiegley
5d4ac67920 chain_xact_handlers now always operators the same
Previously, account-wise reports used a subset of the total number of
transaction filters, but this could cause confusing results, and made
some reports immpossible (such as account-wise monthly averages).
2009-02-15 20:45:09 -04:00
John Wiegley
cb6b6e8b67 acprep doesn't call out to git if it's not there 2009-02-15 20:33:18 -04:00
John Wiegley
24935ab40c Updated myacprep to allow a --output argument 2009-02-15 20:29:46 -04:00
John Wiegley
caeb336176 The format code %C is now equal to %(fmt_C) 2009-02-15 19:53:38 -04:00
John Wiegley
5516a7ddb5 Removed an unused function 2009-02-15 19:49:05 -04:00
John Wiegley
e199e3863c Fixed a call to value_t::cast to use in_place_cast 2009-02-15 19:44:45 -04:00
John Wiegley
a1e1133c80 Whitespace fixes 2009-02-15 19:43:46 -04:00
John Wiegley
2ec9b6a7b2 Split up session_t::reread_journal_files()
You now call session_t::close_journal_files() followed by
session_t::read_journal_files().
2009-02-15 19:32:15 -04:00
John Wiegley
6bfb4206b1 If a boolean value is to an amount, use 1 or 0 2009-02-15 19:25:43 -04:00
John Wiegley
dfee8bc691 Added 'count' and 'subcount' props for accounts 2009-02-15 19:24:17 -04:00
John Wiegley
c1fd59666e Only invoke new completion behavior if C-u is used 2009-02-15 18:00:05 -04:00
John Wiegley
f232d558a8 Strip annotations from the "parse" result
This way the value shown follows the current reporting options.
2009-02-15 17:54:08 -04:00
John Wiegley
3c7388918b Change a few calls to on() to use set_expr() 2009-02-15 17:07:43 -04:00
John Wiegley
20475478a4 Removed the %! formatting code, as it does nothing 2009-02-15 16:42:14 -04:00
John Wiegley
6f7f87699c Parse '/' in an operator context as "div" 2009-02-15 16:34:34 -04:00
John Wiegley
fcd7f4f73b Removed "total_cost" valexpr, and value_t::cost
Since cost reports are now calculated by setting the amount_ expression,
there is no need to track a separate "total cost" entity.
2009-02-15 16:26:26 -04:00
John Wiegley
48d985aacc Restored the --average (-A) report option 2009-02-15 15:50:15 -04:00
John Wiegley
3ef07ae39f Added a helper method for setting expr options
Now one does:

    parent->HANDLER(display_total_).set_expr("total");

Rather than what was required previously:

    parent->HANDLER(display_total_).on("total");
    parent->HANDLER(display_total_).expr = "total";
2009-02-15 15:46:03 -04:00
John Wiegley
5fc1f9dce9 Corrected double problem in period reports
xact_t::add_to_value, in cases where the xact had a "compound" total,
was adding transaction values to the running total twice.
2009-02-15 15:43:13 -04:00
John Wiegley
94aa8e5a91 Changed debug category op.calc to expr.calc 2009-02-15 15:42:12 -04:00
John Wiegley
03219d910f Added xact_t::count member
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.
2009-02-15 15:41:24 -04:00
John Wiegley
36b96c47ac Have interval_xacts construct temps on a list 2009-02-14 23:38:14 -04:00
John Wiegley
50f434a5e3 Generate null transactions for empty periods
For example, if one uses -M to generate a monthly report for an entire
year, and there are no transaction in the month of February, ordinarily
Ledger would report nothing for that month, even if -E were used.  Now
"null transactions" are generated for periods without any activity, in
order to make certain reports -- such as running monthly averages --
more accurate.

For example, instead of -MA being just a monthly running average of
months with activity, it is now a true average among all months during
the reported period.
2009-02-14 05:55:09 -04:00
John Wiegley
ee5e0600aa xact metadata searches get passed up to the entry
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.
2009-02-14 05:37:53 -04:00
John Wiegley
67d63366cb Surround command-line queries with implicit parens 2009-02-14 05:33:29 -04:00
John Wiegley
7bbca2bff5 Removed an #if 0'd function from iterators.cc 2009-02-14 04:58:44 -04:00
John Wiegley
6b515c0cb3 Added #if 0'd stub code from 2.x's option.cc 2009-02-14 04:55:44 -04:00
John Wiegley
1933bb2ead Restored the --actual and --real options 2009-02-14 04:46:53 -04:00
John Wiegley
5290b6e8aa If an option was given no value, throw an error
The previous behavior was to trigger a confusing assertion.
2009-02-14 04:35:22 -04:00
John Wiegley
7fb55eedef Re-enabled periodic reporting options (-M, etc) 2009-02-14 04:31:15 -04:00
John Wiegley
388044dec9 Fixed the way interval_t objects are initialized 2009-02-14 04:27:15 -04:00