Commit graph

70 commits

Author SHA1 Message Date
John Wiegley
ff07cc6c6f Added regression test for 7C44010B 2010-08-16 16:28:08 -04:00
John Wiegley
4d155045a0 Added regression test for 9EB10714 2010-08-16 16:24:37 -04:00
John Wiegley
48a5823181 Based symbol_needs_quotes an invalid_chars (#386) 2010-07-29 03:45:01 -04:00
John Wiegley
1c0785ce78 Fixed typo in previous commit's regression test 2010-06-21 18:35:51 -04:00
John Wiegley
963161a817 bal was sometimes reporting empty accounts 2010-06-21 18:32:03 -04:00
John Wiegley
2f1b1c8ced Change weighting of account-name abbreviation
Parent accounts are abbreviated even more, so that child accounts can
show more text.
2010-06-21 18:05:26 -04:00
John Wiegley
4ea4fa24a4 Added a regression test for the previous commit 2010-06-21 17:54:26 -04:00
John Wiegley
d15bb66ee4 Added missing call to resolve_end() in find_period 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
fa36fef4fa Regression test for last commit 2010-06-20 17:09:07 -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
c367dcab82 Improved algorithm for abbreviating account names 2010-06-14 07:20:23 -04:00
John Wiegley
e78af146e8 Corrected bug with forecasting date bounded xacts 2010-06-13 23:41:50 -04:00
John Wiegley
b1b4e2aadf Add support for typed metadata
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'
2010-06-12 15:43:00 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
8637dd6ccf New display flag AMOUNT_PRINT_ELIDE_COMMODITY_QUOTES
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
2010-06-09 06:45:07 -04:00
John Wiegley
be6cef93c4 A further simplification of -V and -X
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.
2010-06-07 09:49:17 -04:00
John Wiegley
c85cf0d810 Fixed the way prices and costs are print'd 2010-06-07 08:32:14 -04:00
John Wiegley
a4d4f99794 amount_t::print and value_t::print now use flags 2010-06-07 08:32:13 -04:00
John Wiegley
946534b102 A little bit of code cleanup 2010-06-04 02:23:04 -04:00
John Wiegley
0f1afdb3a7 Minor optimization of amount_t::operator* 2010-06-03 05:47:12 -04:00
John Wiegley
cbc0a125c0 Correct display of amounts with keep_precision
Fixes #167 / 1D275740-D1A6-42B7-BDE4-F2F85E30CE8E
2010-06-02 06:24:25 -04:00
John Wiegley
5a2644c1b7 -V/-X options now take price history into account 2010-05-30 20:49:50 -06:00
John Wiegley
04461f49fd Optimized amount_t::in_place_truncate 2010-05-26 00:58:04 -06:00
John Wiegley
a84c42fc17 Fixed regression tests relating to b1d6ea876c 2009-11-24 04:15:21 -05:00
John Wiegley
eab95ad55b Fixed a regression test due to changes in amount.h 2009-11-20 23:41:53 -05:00
John Wiegley
4e30fcdf40 Many improvements to Ledger's Python bindings 2009-11-19 22:24:24 -05:00
John Wiegley
e4b3f0bb3a The new period parser is passing all tests 2009-11-18 05:45:48 -05:00
John Wiegley
c28d828d8e Renamed date_interval_t::end to finish 2009-11-17 21:51:51 -05:00
John Wiegley
e8ea2d4938 Automated postings defer amount expression calculation
This allows for value expressions to be used which reference the
incoming posting, for example:

  = Income:Clients:
    (Liabilities:Taxes:VAT1)  (floor(amount) * 1)
    (Liabilities:Taxes:VAT2)  0.19

  2009/07/27 * Invoice
    Assets:Bank:Checking                           $1,190.45
    Income:Clients:ACME_Inc

The automated posting for VAT1 will use the floored amount multiplied by
a factor, while the posting for VAT2 multiples the whole amount as
before.
2009-11-11 04:22:37 -05:00
John Wiegley
39532bdf35 Automated transactions now use report query syntax
This returns their behavior back very close to what 2.x accepts.
2009-11-10 02:44:16 -05:00
John Wiegley
c3535d06c8 Redesigned the expr_t, predicate_t, query_t classes 2009-11-09 02:06:06 -05:00
John Wiegley
5e3f3d7f47 Report sought magnitude when balancing errors occur 2009-11-05 17:43:28 -05:00
John Wiegley
0a9cc833ad Added a regression test relating to forecasting 2009-11-02 01:59:43 -05:00
John Wiegley
4a249d6172 Fixed issues with period strings like "2009/10" 2009-11-02 01:59:24 -05:00
John Wiegley
3a0879aff0 Added "reported posts" into account xdata
This is necessary because sometimes, a post from one account will get
reported as though it were in another account (this happens with
--budget, to show child account postings within their parent account).
In that case, the account needs to remember which postings have been
reported as being within it, so that it can add these amounts to its own
total in the balance report.
2009-11-02 01:40:07 -05:00
John Wiegley
4db60bb464 Added several new regression tests 2009-11-02 01:21:45 -05:00
John Wiegley
307b63be77 Fixed baseline tests relating to earlier changes 2009-11-02 00:32:34 -05:00
John Wiegley
55f5868380 Setting --date-format in ~/.ledgerrc works again 2009-10-29 00:52:51 -04:00
John Wiegley
18a1c8a3fb No more trailing spaces in the print report 2009-10-28 01:43:04 -04:00
John Wiegley
fc84eeb358 Rewrote the way date and time I/O is managed 2009-10-25 05:01:47 -04:00
John Wiegley
f161aea8ce Removed reliance on strptime/strftime
The code now uses Boost's input and output facets for times and dates.
This ensures completely consistency regarding timezones and times, and
fixes the regression test that was broken while I was away coding in
London (where it was GMT-0 and I didn't notice the difference between
local and GMT).
2009-10-11 05:19:01 -04:00
John Wiegley
e8f315f00d Correctly align amounts formatted as "%12(amount)" 2009-06-28 15:53:46 +01:00
John Wiegley
4574c30fcf The --download option is now fully restored 2009-06-26 16:52:41 +01:00
John Wiegley
4253c2a35d Allow uncommoditized amounts to be used as costs 2009-06-18 16:10:08 +01:00
John Wiegley
8121e0b178 Added regression test for period range fix 2009-06-18 01:23:06 +01:00
John Wiegley
cb2e596725 The --revalued option now honors the -e terminus 2009-06-17 16:54:02 +01:00
John Wiegley
3a926da4cb When --end is used, set a "terminus" date
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
2009-06-16 18:49:27 +01:00
John Wiegley
849e4b2fbb Added test for D943AE0F-44EA-47EE-BA85-AFC513E039EB 2009-06-16 18:29:26 +01:00
John Wiegley
9655f43bed Added test for 5FBF2ED8-EEAA-440E-AED5-67401B107E44 2009-06-16 18:28:05 +01:00