John Wiegley
ea418c7fbc
Allow date and datetime values to inter-convert
2009-02-22 22:22:54 -04:00
John Wiegley
ea75613760
--exchange option now accepts multiple commodities
...
They must be separated by a comma, and all whitespace is ignored.
2009-02-22 17:51:11 -04:00
John Wiegley
e124811d8a
Added --exchange (-x) option
...
This is like -V, except it lets you specify the goal commodity to report
in terms of, for example:
reg -x CAD
2009-02-22 04:51:11 -04:00
John Wiegley
04fd1ae24c
Fixed the way values are justified for printing
2009-02-22 04:51:11 -04:00
John Wiegley
640279c65d
Allow balances to be rounded and unrounded
2009-02-22 04:51:11 -04:00
John Wiegley
8ca91c1196
Allow balance values to be compared < or > 0
2009-02-21 22:00:00 -04:00
John Wiegley
aeea1cb3e1
Fixed a memory leak in value_t::storage_t
2009-02-21 03:48:02 -04:00
John Wiegley
4fe4a33bf8
Justify integers correctly when printing
2009-02-21 00:45:54 -04:00
John Wiegley
c87882076b
Allow date and datetime values to be formatted into strings
2009-02-20 18:33:02 -04:00
John Wiegley
2694335e54
Simplify account total values before comparison
...
This way, if two account values are BALANCE types containing only a
single AMOUNT, then it will do the sorting comparison of the amounts --
since otherwise balances are ignored for the purposes of sorting.
2009-02-19 21:57:17 -04:00
John Wiegley
7fb328707c
Fixed another sort issue
2009-02-19 17:27:05 -04:00
John Wiegley
1d85e992ca
A key fix to the ways accounts were sorted
...
Comparing integer < amount was doing the reverse comparison.
2009-02-19 17:20:36 -04:00
John Wiegley
9805abbf2b
Allow for sorting of the balance report
...
Sorting is repeated at each level of the hierarchy, unless --flat was
specified in which case it applies to the entire applicable accounts
list.
2009-02-19 16:53:25 -04:00
John Wiegley
1fa3c1956f
Moved amount_t::right_justify to simply ::justify
2009-02-19 01:22:22 -04:00
John Wiegley
4de2f50818
Always print zero amounts as "0"
2009-02-16 03:46:52 -04:00
John Wiegley
f8681e482e
Print <POINTER> if value_t::is_pointer()
2009-02-16 01:11:31 -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
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
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
326cbea4c7
The formatting code no longer justifies values
...
This is done in the value code, which knows -- based on the value's type
-- how best to apply the justification.
2009-02-13 19:27:37 -04:00
John Wiegley
49a1373deb
Renamed a function to sort_value_is_less_than
...
The purpose was to provided a clearer relationship between the function
name and its expected arguments.
2009-02-12 22:47:27 -04:00
John Wiegley
092542a3bf
Sorting expr now uses "-" to indicate descending
...
For example: -S payee,-date sorts 1) ascending by payee, then 2)
descending by date.
2009-02-12 20:45:33 -04:00
John Wiegley
c8cd2c468e
Re-enabled some code, and removed a bunch of deadwood.
2009-02-12 03:30:41 -04:00
John Wiegley
bb243e2c5e
Fixed a typo which was causing all boolean values to show as "false".
2009-02-12 03:06:30 -04:00
John Wiegley
433bb11fa9
Moved value_t::set_type into value.cc, since it had grown.
2009-02-12 02:36:14 -04:00
John Wiegley
6f2e3b8864
Properly handle UTF-8 characters in commodity strings.
2009-02-12 02:34:39 -04:00
John Wiegley
d726624e60
Changed value_t to use boost::any (more type-safe).
2009-02-10 04:24:06 -04:00
John Wiegley
a072b7e208
Fixed a case where adding an amount to an integer failed.
2009-02-09 15:07:45 -04:00
John Wiegley
3f7104e9be
Removed the balance_pair_t type, since it's now an unneeded abstraction.
...
This type was a holdback from the days before the amount_expr was used
everywhere to determine a transaction's value.
2009-02-09 14:54:42 -04:00
John Wiegley
2d5ad7dee8
Added support for value expression definitions.
...
Example:
] expr f(x) := x + 100
] expr f(100)
200
2009-02-08 04:30:05 -04:00
John Wiegley
b662509ee9
amount_t::in_place_* now returns void. Added value_t::unreduce.
2009-02-07 22:50:19 -04:00
John Wiegley
96e11c5937
Don't allow regexps to be evaluated in a boolean context.
2009-02-07 17:45:57 -04:00
John Wiegley
47725095da
Allow regular expressions to be "printed".
2009-02-07 00:04:43 -04:00
John Wiegley
327fdca8f4
Display value booleans as 0 and 1.
2009-02-05 03:49:14 -04:00
John Wiegley
2d941730b1
Largely removed all of Ledger's use of global variables, for the REPL's sake.
2009-02-04 19:55:27 -04:00
John Wiegley
918f76b263
Don't allow boolean operations to be applied to masks.
2009-02-03 17:47:14 -04:00
John Wiegley
3434650848
Removed the binary caching code, and the XML, QIF and Gnucash parsers.
2009-02-03 12:22:10 -04:00
John Wiegley
46b35a015b
Don't allow implicit matching of strings against masks, =~ is needed.
2009-02-02 15:16:40 -04:00
John Wiegley
fb5428ce85
Added support for metadata and tagging, and made regexs a first-class type.
2009-02-01 22:10:32 -04:00
John Wiegley
9f8997f1b5
Values can now be streamed to XML, and all the types they refer to.
2009-02-01 01:48:07 -04:00
John Wiegley
e9ff5caa13
Rationals based math is now passing the unit tests.
2009-01-31 04:25:05 -04:00
John Wiegley
e0dd2cd0a4
Changed to using rational numbers instead of integer approximations.
...
As a result, dependency on the gdtoa was dropped, and dependency on mpfr was
added.
2009-01-30 19:30:16 -04:00
John Wiegley
b205090bb7
Changed around the ==, < and > operators in value.h to be correct.
2009-01-28 17:17:06 -04:00
John Wiegley
71e7157a65
Added is_nonzero and a stream-based read() method to value_t.
2009-01-26 20:50:54 -04:00
John Wiegley
e95e8c3f79
Corrected a parse-time optimization of "! CONSTANT".
2009-01-22 18:53:44 -04:00
John Wiegley
887828a40c
Increased copyright range to include 2009.
2009-01-20 01:53:31 -04:00
John Wiegley
adf8cfbbc0
Can now determine the market value of balance pairs, even if stored within
...
value_t objects.
2009-01-19 22:23:02 -04:00
John Wiegley
43ba0bb038
Corrected a harmless warning.
2008-09-19 06:55:07 -04:00
John Wiegley
7d1809cb15
Transactional assignments (i.e., confirmed balances) are working now.
2008-09-14 19:38:44 -04:00
John Wiegley
0135c28049
Added in_place_round method to all Ledger numerical types.
2008-09-14 19:36:55 -04:00