Commit graph

74 commits

Author SHA1 Message Date
Alexis Hildebrandt
1dd9dcaab4 Bump copyright notice to 2015
The following script makes it a no-brainer:
% NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \
  | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
2014-12-27 11:24:55 +01:00
Alexis Hildebrandt
2b9208e850 Bump copyright information to 2014 2014-02-02 12:36:22 +01:00
John Wiegley
0951bcebef Bump copyright information to 2013 2013-02-18 06:51:21 -06:00
John Wiegley
d2422f99e6 Allow the equity command to strip annotations 2012-03-19 04:18:56 -05:00
John Wiegley
59f5ebe2df Reworked the way that options are handled 2012-03-09 03:51:53 -06:00
John Wiegley
7e250696e0 Many options now have additive effect
For example, -A and -V used to override each other, whereas now:

  -A    report the average amount
  -V    report all amounts at current value
  -AV   report the current value of the average
  -VA   report the average of all current values
2012-03-07 12:46:46 -06:00
John Wiegley
dd6bcf347e Removed an unnecessary assert 2012-03-07 10:32:46 -06:00
John Wiegley
e2afc783db Increased file copyrights to 2012 2012-02-29 22:32:23 -06:00
John Wiegley
6adfcc8469 Rewrite the way interval reports are generated 2012-02-28 02:34:37 -06:00
John Wiegley
168c111c62 Corrected a typo 2011-07-03 00:29:59 -05:00
John Wiegley
3a5653e365 Rename dow_posts to day_of_week_posts, to be clearer 2010-06-20 20:29:56 -04:00
John Wiegley
6770380b6d Subsantial fixes and improvements to budgeting
1. A bounded budget "from DATE to DATE" will now generate entries
    throughout that entire range, if it is triggered.

 2. An unbounded budget begins, as before, in the timeframe of the
    reported posting which triggered it, but now continues until the
    present date.
2010-06-19 16:07:59 -04:00
John Wiegley
5da1e7756d Added new option --inject=KEY[,KEY...]
If you have a typed metadata key which contains an amount, you can use
--inject=KEY to inject a posting with that amount wherever a match
occurs.  There are two main forms of usage:

  2010-06-18 Sample
      ; Key:: $100
      Expenses:Food                $100.00
      Assets:Checking

The command would be:

  ledger reg --inject=Key

In the above, transactional form, a posting under the account "Key" will
be injected before the first posting reported for this transaction.
It's amount will be $100.  This only happens once for the whole
transaction.

It is also possible to associate the key with a posting:

  2010-06-18 Sample
      Expenses:Food                $100.00
      ; Key:: $100
      Assets:Checking

Now the injected posting is generated whenever that particular post is
reported.
2010-06-18 02:28:12 -04:00
John Wiegley
34fcc62b4d Removed unused --unsorted option 2010-06-15 04:34:16 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
8bd362b5d1 Minor optimization of how non --empty is handled 2010-06-07 08:32:13 -04:00
John Wiegley
39f9854e2c Reworked the way that <Rounding> entries are shown
Fixes #188 / 53BCED29-F3B9-4E02-9A35-6C739ABB9662
2010-06-06 06:20:07 -04:00
John Wiegley
647d4aac2f New: --group-by=EXPR and --group-title-format=FMT
The --group-by option allows for most reports to be split up into
sections based on the varying value of EXPR.  For example, to see
register subtotals by payee, use:

  ledger reg --group-by=payee -s

This works for separated balances too:

  ledger bal --group-by=payee

Another interesting possibility is seeing a register of all the accounts
affected by a related account:

  ledger reg -r --group-by=payee

The option --group-title-format can be used to add a separator bar to
the group titles.  The option --no-titles can be used to drop titles
altogether.
2010-05-30 02:47:40 -06:00
John Wiegley
a41d33fba3 Option --rounding inverted to --no-rounding 2010-05-30 02:47:40 -06:00
John Wiegley
7bddcd676b Added --rounding option, which is off by default
The purpose of this option is to add special "<Rounding>" postings, to
ensure that a regiter's running total is *always* the sum of its
postings.  Within --rounding, these adjustment postings are missing,
which was the behavior in Ledger 2.x.  It can be orders of magnitude
slower to turn it on for large reports with many commodities.
2010-05-23 15:45:51 -06:00
John Wiegley
0e34d08b8d The --pivot=X option now only matches the tag "X" 2010-03-17 00:56:21 -04:00
John Wiegley
91f839e827 Do not implicitly sort register output
The switches the default back to the same as 2.x, which is --unsorted.
2010-03-17 00:49:11 -04:00
John Wiegley
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
1413085977 Added a --pivot=TAG option
This is equivalent to the following:

  --account='"TAG:" + tag(/TAG/)'
2010-02-02 17:07:05 -05:00
John Wiegley
63fee4c837 Added an --unrealized option, for use with bal -V
When this option is on, then in balance report which show market values,
any gains or losses in value will be balanced into a pair of accounts
called Equity:Unrealized Gains and Equity:Unrealized Losses.
2009-11-19 02:00:10 -05:00
John Wiegley
0c3a6234a9 Don't auto-sort transactions for the balance report 2009-11-19 01:26:50 -05:00
John Wiegley
20965d9fa3 Changed several pointers to references in filters 2009-11-19 01:26:34 -05:00
John Wiegley
ae8b57f157 Renamed bool controlling running total calculations
It used to be "account_wise", since it only happens for non-account-wise
reports.  Now it's called just "calc_running_total", so anyone can
request it.
2009-11-18 23:25:28 -05:00
John Wiegley
539887b3fb Changed only_preliminaries to for_accounts_report 2009-11-18 23:13:33 -05:00
John Wiegley
67c9cf134d Added --date, similar to --account and --payee
This lets you do things like store a date as the value of a tag, then
run:

  ledger --date='has_tag("Foo") ? to_date(tag("Foo")) : date' reg
2009-11-11 21:32:32 -05:00
John Wiegley
c3535d06c8 Redesigned the expr_t, predicate_t, query_t classes 2009-11-09 02:06:06 -05:00
John Wiegley
a05d39b722 Renamed --set-reported-account to just --account
This fits better with the --amount and --total options, which both
change the amount and total used for calculation.  Same with --account:
it happens after filtering, but before calculation so that balance
reports look as you'd expect.
2009-11-06 02:39:30 -05:00
John Wiegley
449c7ca790 New: --set-reported-account, --set-reported-payee 2009-11-01 21:15:11 -05:00
John Wiegley
b0f12c600c Added a --forecast-years option
This sets how many years of forecasting Ledger will do before it
terminates the attempt.
2009-10-31 03:07:15 -04:00
John Wiegley
63aa8992a8 Moved ownership of master account into journal_t
The journal_t now completely represents the data part of a session.
2009-10-30 19:03:28 -04:00
John Wiegley
559566751d Sort by default unless --unsorted is selected 2009-10-28 01:17:10 -04:00
John Wiegley
588f2ef2f5 Fixed many compiler warnings from g++ 4.4 2009-10-25 05:01:39 -04:00
John Wiegley
110f0b8023 Enabled use of pre-compiled headers by default 2009-03-10 17:02:03 -04:00
John Wiegley
dd23edd5ce Implemented --unround using value expressions 2009-03-06 00:27:16 -04:00
John Wiegley
fb9af0f111 Removed the --totals option 2009-03-05 23:26:21 -04:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
eb45a0a4f4 Normalized how account totals are calculated 2009-03-03 17:08:11 -04:00
John Wiegley
c49b98fc4c Added an --unround option, to show full precision 2009-02-27 03:04:05 -04:00
John Wiegley
d58797e98c The -B, -G, -V reports now show rounding amounts
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.
2009-02-26 03:16:39 -04:00
John Wiegley
944c63e6f2 The Great Renaming, Part II
The last commit did not contain the majority of changes because of a
slight mishap.  This contains the real changeset.
2009-02-23 19:07:30 -04:00
John Wiegley
a576842865 Added --revalued-total option, used by --gain
This option sets the total by which revalued transactions are
determined.  Only needed if the display total is not appropriate.
2009-02-23 15:37:39 -04:00
John Wiegley
9f53efbf5f Many fixes to both --market and --exchange 2009-02-23 01:51:23 -04:00
John Wiegley
cebc1da256 Restored the --invert option 2009-02-22 04:51:08 -04:00
John Wiegley
d0ac3a2e4e Added a new --exact option
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.
2009-02-21 02:14:53 -04:00
John Wiegley
23725ffafb Restored --forecast, now also --forecast-while 2009-02-21 00:12:22 -04:00