Commit graph

781 commits

Author SHA1 Message Date
John Wiegley
07cca71893 Renamed two methods, for consistency's sake 2009-10-27 21:33:33 -04:00
John Wiegley
ab433d28e0 Support a --now option, for testing purposes
This sets Ledger's notion of the "current time" to the given date.  This
makes it possible to have stable output from budgeting and forecasting
reports, for the sake of baseline tests.
2009-10-27 21:32:55 -04:00
John Wiegley
aae134f692 Fixed a display issue with the balance report 2009-10-27 19:01:55 -04:00
John Wiegley
cbf8f355d1 In budget report, color large percentages magenta 2009-10-27 17:30:53 -04:00
John Wiegley
12616dd030 Fixed an error with post-simplified math 2009-10-27 17:30:34 -04:00
John Wiegley
3ea7fbd5f6 If doing math between amount and balance, simplify 2009-10-27 08:30:59 -04:00
John Wiegley
63ae4531b8 Support balancing of postings with integer amounts 2009-10-27 08:30:59 -04:00
John Wiegley
1f379eff70 Fixed some debug code 2009-10-27 08:30:59 -04:00
John Wiegley
fd23b56a21 Added a new "cleared" report
This is a balance report with three columns:

  Current balance | Cleared balance | Last cleared date
2009-10-27 08:30:59 -04:00
John Wiegley
88460db2fb Added a new "budget" report
This is a balance report with four columns:

  Amount spent |  Budgeted Amount | Difference | Percentage
2009-10-27 08:30:59 -04:00
John Wiegley
a8768587c8 Allow any amount to be multipled by another
The result carries the commodity of the first amount, or the second if
the first had no commodity.
2009-10-27 08:30:59 -04:00
John Wiegley
4bdc0a663c Added debug code 2009-10-27 08:30:59 -04:00
John Wiegley
23a7c22c70 Use the WRITTEN date format for idstrings 2009-10-27 08:30:58 -04:00
John Wiegley
0fdb900c99 Redid the way temporaries are handled in filtering 2009-10-27 08:30:39 -04:00
John Wiegley
f20b6a3b9e Fixed a data lifetime bug
This was causing budget totals not to appear in balance reports.

Fixes 8254755E-7B61-47C8-B48E-A2A7FD79EB80
2009-10-27 05:23:24 -04:00
John Wiegley
6a2c6db071 When creating temp posts, add them to the account 2009-10-27 05:22:47 -04:00
John Wiegley
8b2bf571d8 Added a comment about a confusing bit of code 2009-10-27 05:22:12 -04:00
John Wiegley
20e6451ff1 Removed two invalid comments 2009-10-27 05:22:03 -04:00
John Wiegley
ddfd00afe1 Made the id function available in post contexts 2009-10-27 04:00:59 -04:00
John Wiegley
5ddb0e9bfb Output pointer values correctly for 64-bit systems 2009-10-27 04:00:35 -04:00
John Wiegley
3fdd75fb5b Balance assertions now really assert
There are two kinds of balance related options for a posting: a balance
assignment, where the amount of the posting is blank and so it fills it
in to make the assertion true; and plain assertions, where the amount is
not blank and an error is reported if the balance does not match the
given amount after the posting is taken into account.
2009-10-26 19:08:15 -04:00
John Wiegley
4f11ded5bc Added t and T as valexpr synonyms
t = display_amount, T = display_total
2009-10-26 18:52:43 -04:00
John Wiegley
151a8d87ee Fixed sorting in bal reports when --flat is used
Note that sorting on the "total" is not the same thing as sorting on the
"display_total" when multiple commodities are in use and the -X flag is
selected!  One should always sort on display_total, since that's the
value which is shown in the report.  'T' is a synonym for display_total.
2009-10-26 18:52:26 -04:00
John Wiegley
d85a415bc5 In the balance report, don't output any account twice 2009-10-26 17:23:46 -04:00
John Wiegley
1ed22646f1 Added an "echo" command, for REPL testing 2009-10-26 17:17:23 -04:00
John Wiegley
8999607408 If a pricing entry fails to parse, give an error 2009-10-26 17:17:12 -04:00
John Wiegley
feff681f44 Improved argument parsing logic used by the REPL
It now handles quoted strings, although it doesn't understand escape
sequences yet.
2009-10-26 17:17:01 -04:00
John Wiegley
a8182c32bd Fixed the Boost facet-based time parsing code 2009-10-25 18:55:13 -04:00
John Wiegley
f25a32c92c Whitespace and comment changes 2009-10-25 05:40:10 -04:00
John Wiegley
b061c8082f Export times_initialize and times_shutdown to Python 2009-10-25 05:39:59 -04:00
John Wiegley
ca1560d53d Fixed overflow bug introduced by the warning fixes 2009-10-25 05:39:47 -04:00
John Wiegley
2c8e7485a7 Fixed the memory tracing code (used by --verify) 2009-10-25 05:01:47 -04:00
John Wiegley
e2875f47ec Added some extra storage checks to value_t 2009-10-25 05:01:47 -04:00
John Wiegley
26ae1fdfad New valexpr functions: id, idstring, magnitude
id returns a unique SHA1 id of a transaction.
idstring is the string that the SHA1 is based on.
magnitude is the sum of the positive side of a transaction.
2009-10-25 05:01:47 -04:00
John Wiegley
5a970554b8 The UTF8 code is now unchecked if --verify is off 2009-10-25 05:01:47 -04:00
John Wiegley
9b13e77ff5 Improved debug output of "--debug expr.calc" 2009-10-25 05:01:47 -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
588f2ef2f5 Fixed many compiler warnings from g++ 4.4 2009-10-25 05:01:39 -04:00
John Wiegley
48d24e2a4c Use boost::iostreams::file_descriptor_sink
This is instead of the custom fdstream.hpp file I was distributing.
2009-10-25 04:28:49 -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
475014a14b Added some missing casts, upgraded to Boost 1.40 2009-10-09 19:50:23 -04:00
John Wiegley
5ac73e1a1f The print command now implies --actual 2009-06-28 17:37:16 +01:00
John Wiegley
2cec787182 Disable use of ~/.pricedb when --args-only is present 2009-06-28 16:11:45 +01:00
John Wiegley
0283f444c5 Date and time are optional for pricing directives 2009-06-28 16:06:27 +01:00
John Wiegley
bad1b13680 value_t::dump now faithfully represents strings 2009-06-28 16:00:29 +01:00
John Wiegley
b90ec25522 Reject downloaded quotes price in the wrong commodity 2009-06-28 15:57:49 +01:00
John Wiegley
e8f315f00d Correctly align amounts formatted as "%12(amount)" 2009-06-28 15:53:46 +01:00
John Wiegley
d0c47b1bc2 Added debug code "option.names"
Use "--debug option.names" to see all accepted (internal) option names.
2009-06-27 01:48:41 +01:00
John Wiegley
7b05595699 Improved usefulness of the "print --anon" output 2009-06-27 01:45:31 +01:00
John Wiegley
bf30f989f6 Removed some dead code 2009-06-27 01:32:46 +01:00