Commit graph

3441 commits

Author SHA1 Message Date
John Wiegley
d792cc0ffc Corrected a major flaw in the transaction finalizer
When a transaction has two commodities, but also a null posting, no
attempt should be made to resolve the costs in terms of the primary
commodity.
2010-06-21 17:44:19 -04:00
John Wiegley
fcfa491485 Improvements to time period parsing
Things like "since last month" and "4 weeks ago", and "since 4 weeks
ago" are now all working.
2010-06-21 17:02:48 -04:00
John Wiegley
009e07690d Added tests for sole budget/forecast reports 2010-06-21 13:25:17 -04:00
John Wiegley
9d9a8bd83d Corrected a compilation warning 2010-06-21 13:20:44 -04:00
John Wiegley
b514b34120 Fixed an incorrect path in tools/proof 2010-06-21 12:02:43 -04:00
John Wiegley
1ee16304b4 Transactions no longer needed for budget/forecast
This means you can forecast or budget against a file containing only
periodic transactions.
2010-06-20 20:58:07 -04:00
John Wiegley
7b6cc4c365 Output budget even if no postings directly matched 2010-06-20 20:55:24 -04:00
John Wiegley
96b652310c Don't warn about --import in doc when --no-python 2010-06-20 20:35:35 -04:00
John Wiegley
d15bb66ee4 Added missing call to resolve_end() in find_period 2010-06-20 20:29:56 -04:00
John Wiegley
c5714a81e3 Factored out some unused local variables 2010-06-20 20:29:56 -04: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
82e43fe125 If fixated price commodities are mixed, show them
For example, if a Ledger file contains transactions with the use of both
EUR and EUR {=PRICE}, then regular reports will always show the
{=PRICE}, disabling the by-name commodity merging that takes place.  In
brief, fixated and non-fixated commodities are now non-mergable.

If a file contains all of one, or all of the other, they will still be
merged, since these separate usages do not conflict the way that fixated
and non-fixated together do.
2010-06-20 20:29:53 -04:00
John Wiegley
6420390d36 If a posting's price has an annotation tag, save it 2010-06-20 18:50:44 -04:00
John Wiegley
470730c92d --input-date-format now affects dates with times 2010-06-20 18:37:14 -04:00
John Wiegley
fc7e67f403 Do not record market values for fixated exchanges
Do not record commodity exchanges where amount's commodity has a fixated
price, since this does not establish a market value for the base
commodity.
2010-06-20 18:02:19 -04:00
John Wiegley
71de29d2d5 Only run the CheckTests if DEBUG mode is enabled 2010-06-20 17:16:28 -04:00
John Wiegley
b95818026f When anonymizing posts, remove the transaction code 2010-06-20 17:13:59 -04:00
John Wiegley
9ce498f890 Added debug print for commodity.prices.find 2010-06-20 17:10:50 -04:00
John Wiegley
fa36fef4fa Regression test for last commit 2010-06-20 17:09:07 -04:00
John Wiegley
135d997293 If a periodic posting terminates, stop forecasting with it 2010-06-20 17:08:27 -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
b819475a93 Fix to the way simplified regressions tests are read 2010-06-19 16:06:15 -04:00
John Wiegley
b589829646 Initial skeleton for the 3.0 manual 2010-06-19 15:47:32 -04:00
John Wiegley
7995e16762 Corrected a bug in report query parsing 2010-06-19 14:02:44 -04:00
John Wiegley
9b905f2b44 query command's parsing behavior sensitive to -n
With -n, the first argument is parsed as a string containing
subarguments.  Otherwise, each argument is parsed as a separate
argument.

In short, the -n mode mimicks what happens when the query expr after "="
is parsed for automated expressions.  The non -n mode mimicks what
happens at the command line for users.
2010-06-19 14:02:33 -04:00
John Wiegley
627162acc0 Made amount_t::value a bit safer 2010-06-19 13:34:15 -04:00
John Wiegley
6fd512cc11 Added NEWS entries for 2.6.2 and 2.6.3 2010-06-19 13:34:03 -04:00
John Wiegley
4bbce6dc7b When --inject is used for a tag, convert to an amount 2010-06-18 19:44:10 -04:00
John Wiegley
b7ea365bfc Renamed the "Rounding" account to "Adjustment" 2010-06-18 08:29:14 -04:00
John Wiegley
66de7e3055 Filename globs now surrounded by ^$ 2010-06-18 07:28:11 -04:00
John Wiegley
a961f15f00 Fixed bug that had broken any() and all() 2010-06-18 07:27:53 -04:00
John Wiegley
9205809d49 Fixed register formatting of postings with payees 2010-06-18 07:27:35 -04:00
John Wiegley
6f73a4db0c Made "convert" command insensitive to null amounts 2010-06-18 07:27:18 -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
7e2547b1e4 A metadata key must occur at the beginning
Before, this was valid:

  ; Today Yesterday: Tomorrow

Which would set the key Yesterday to the value Tomorrow.  Now, it is
just an ordinary comment.
2010-06-18 02:21:02 -04:00
John Wiegley
b881220987 Minor fix to the way transfer_details sets post date 2010-06-18 02:20:12 -04:00
John Wiegley
b80be82b8d has_tag and get_tag now take an 'inherit' parameter 2010-06-18 02:19:39 -04:00
John Wiegley
5f989f7d9f Corrected printing of assigned amounts 2010-06-18 02:18:44 -04:00
John Wiegley
805a78c121 Only look for [date] outside of metadata entries 2010-06-18 00:46:37 -04:00
John Wiegley
31e8ed7587 Individual postings may each have their own payee
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.
2010-06-17 23:42:23 -04:00
John Wiegley
f82ae73ecf Improvements to tools/speed-test.sh 2010-06-17 23:34:24 -04:00
John Wiegley
36ed7f744f Created a script to check commenting coverage 2010-06-15 21:32:05 -04:00
John Wiegley
35ca4f0bb0 Ensure that all options are tested and documented 2010-06-15 18:19:54 -04:00
John Wiegley
b6dae554fe Don't build gcov Ledger with asserts enabled 2010-06-15 16:46:05 -04:00
John Wiegley
a36541d4f0 Updated MacPorts Portfile 2010-06-15 16:46:05 -04:00
John Wiegley
aa55e5ede2 Extended proof/push to upload tarballs/gcov 2010-06-15 16:45:50 -04:00
John Wiegley
014fde3418 v3.0.0-20100615 2010-06-15 07:09:57 -04:00
John Wiegley
35e845f38d Corrected the 'report' rule in Makefile.am 2010-06-15 07:09:57 -04:00
John Wiegley
be91f38ab4 Merge branch 'next' 2010-06-15 06:28:30 -04:00
John Wiegley
968a6f3c0a Changes for building with Visual Studio 2008 2010-06-15 05:14:00 -04:00