Simon Michael
c39e424642
basic querying by amount: "amt:<0", "amt:=100", etc.
...
The syntax is "amt:ON", where O is "<", "=" or ">" and N is a number.
For simple (single-commodity) amounts, this matches if the amount's quantity has the specified relationship to N.
For multi-commodity amounts, it always matches.
If parsing fails, an error is raised.
This has not been tested for floating-point precision.
2013-03-20 16:36:00 +00:00
Simon Michael
9ffb0b2d1f
export journal file code parser, part 2 - missed a bit >:|
2013-02-25 19:35:51 +00:00
Simon Michael
69f2491224
export journal file code parser
2013-02-24 21:07:54 +00:00
Simon Michael
33153851e9
words' on an empty string should return empty list
2013-02-24 20:04:28 +00:00
Simon Michael
2a6a028222
register: date display refinements
...
- when showing multiple postings from a transaction, show their individual dates accurately
- with --date2, use that date for sorting
2013-02-14 21:12:35 +00:00
Simon Michael
67d1f91909
web: fix compilation; also fixes some hardcoded static urls (Xinruo Sun)
2013-01-11 13:54:49 +00:00
Simon Michael
7175c57992
reg: --related/-r flag to show other postings in the transaction
2012-12-22 00:24:38 +00:00
Simon Michael
552a15a1ba
reg: --width/-w option to adjust register overall output width
2012-12-21 21:56:11 +00:00
Simon Michael
621a91807e
rename actual/effective dates to primary/secondary
...
The command-line flag is now --date2. Alternate spellings --effective and --aux-date
are accepted for compatibility.
2012-12-06 04:43:41 +00:00
Simon Michael
7d1fce42fe
refactor: dead code
2012-12-06 03:56:12 +00:00
Simon Michael
869ff2528a
accept normal simple date syntax in posting dates, give an error on bad date syntax here
2012-12-06 03:23:56 +00:00
Simon Michael
20e68f23a8
support effective dates on postings as well
...
We now preserve all dates while reporting, instead of overwriting one with the other.
2012-12-06 02:41:37 +00:00
Simon Michael
ccbc071289
more cleanup, fix duplicate tag display
2012-12-06 02:09:53 +00:00
Simon Michael
27621515ea
bal, reg: use posting date if specified, clarify posting effective date not yet supported
2012-12-06 01:10:15 +00:00
Simon Michael
dfeafa6064
export accountBalanceHistory
2012-12-06 01:09:12 +00:00
Simon Michael
e75abc4625
parse posting dates, better comment/tag handling, begin using HTF for unit testing
2012-12-06 00:28:23 +00:00
Simon Michael
4aafeb32e6
refactor: clean up Posting construction
2012-12-06 00:03:07 +00:00
Simon Michael
26ad56e1b2
untested accountBalanceHistory calculator
2012-12-05 23:52:46 +00:00
Simon Michael
0913e54e93
94: fix a regression with non-flat balance report, caused by previous fix
...
Correct in all cases now, hopefully.
2012-12-05 23:51:42 +00:00
Simon Michael
51a8adf273
regexSplit, ptrace (parsec trace) utilities
2012-12-05 23:49:50 +00:00
Simon Michael
f54e3299b9
94: fix 0.19 regression showing wrong total balance with balance --flat
...
and distinguish better between account depth and item indent level
2012-12-04 01:07:04 +00:00
Joachim Breitner
f0372bdd93
Also parse ! as a modifier, like *
2012-12-03 21:38:05 +00:00
Simon Michael
157c85a915
move stripbrackets to Utils
2012-12-04 00:03:42 +00:00
Simon Michael
6eda8c4bbf
csv reader: append ".rules" to the original file name instead of replacing its extension
2012-11-26 01:56:39 +00:00
Simon Michael
afb4fb0356
csv reader: parse parenthesised amounts as negative
2012-11-26 01:56:01 +00:00
Simon Michael
8b4a99c4d5
79: convert: add a skip-lines directive (Magnus Henoch)
2012-11-18 18:21:52 +00:00
Simon Michael
5c972ef00c
more correct debug util name
2012-11-19 21:17:43 +00:00
Simon Michael
79f0e98186
tools: fix haddock generation (web excluded)
2012-11-19 23:36:36 +00:00
Simon Michael
4248df5c6f
clarify historical price field and tests
2012-11-20 00:27:43 +00:00
Simon Michael
1c6a7d8a6f
rename the commodityless amount constructor to num
2012-11-20 02:22:20 +00:00
Simon Michael
45d4a38cc7
refactor: setAmountPrecision -> withPrecision
2012-11-19 23:24:04 +00:00
Simon Michael
64180b18ef
refactor: clarify that price amounts have only a single commodity
2012-11-19 23:17:55 +00:00
Simon Michael
8c06553e3b
refactor: make amount price a non-maybe, reducing noise
2012-11-19 22:39:08 +00:00
Simon Michael
4567e91409
refactor: move amount display settings out of commodity, simplify amount construction
2012-11-19 21:20:10 +00:00
Simon Michael
cbc7661703
87: fix an arithmetic and transaction balancing bug with multiple total-priced amounts
2012-11-12 16:31:43 +00:00
Simon Michael
d2aa8ca6cb
note future debug tools
2012-11-15 17:46:48 +00:00
Simon Michael
1c1058be4e
70: ignore ledger's fixed lot price declarations
2012-11-17 02:40:27 +00:00
Simon Michael
28baf926f7
parsing: ignore ledger-style balance assertions ("= BAL" after a posting's amount)
2012-11-02 16:50:36 +00:00
Simon Michael
5b9c5459be
web: make hledger[-lib] compatible with all of yesod's language extensions
...
Useful when building all of hledger-web at once.
2012-11-14 17:25:02 +00:00
Simon Michael
00f22819ae
balance report speedup
...
This refactoring fixes an O(n^2) slowdown in the balance command with
large numbers of accounts. It's now speedy, and the implementation is
clearer. To facilitate this, the Account type now represents a tree of
accounts which can easily be traversed up or down (and/or flattened
into a list).
Benchmark on a 2010 macbook:
+-------------------------------------------++--------------+------------+--------+
| || before: | after: | |
| || hledger-0.18 | hledgeropt | ledger |
+===========================================++==============+============+========+
| -f data/100x100x10.journal balance || 0.21 | 0.07 | 0.09 |
| -f data/1000x1000x10.journal balance || 10.13 | 0.47 | 0.62 |
| -f data/1000x10000x10.journal balance || 40.67 | 0.67 | 1.01 |
| -f data/10000x1000x10.journal balance || 15.01 | 3.22 | 2.36 |
| -f data/10000x1000x10.journal balance aa || 4.77 | 4.40 | 2.33 |
+-------------------------------------------++--------------+------------+--------+
2012-10-21 17:18:18 +00:00
Simon Michael
2a4d89bb27
expose more utilities from CsvReader
2012-05-29 21:00:49 +00:00
Simon Michael
0b96a767b4
support tilde (~) in journal and rules file paths
2012-05-30 08:36:01 +00:00
Simon Michael
776ad2a098
remove ensureRulesFile debug trace
2012-05-30 08:36:34 +00:00
Simon Michael
ec2f35ef07
split up accountsReport unit tests
2012-05-30 11:23:03 +00:00
Simon Michael
e6de8df97f
balance: respect all query terms, not just acct
2012-05-30 11:24:08 +00:00
Simon Michael
34318906d8
register, print: fix reverse ordering of same-day transactions
2012-06-29 18:06:58 +00:00
Simon Michael
6ccecb6ae0
stats: list included journal files
2012-05-30 09:17:18 +00:00
Simon Michael
33b7c91e20
combine journal updates with foldl' instead of foldr
...
on general principles, even though it makes no measurable difference
2012-05-30 10:19:08 +00:00
Simon Michael
9a239789fa
apply journal updates in the order they were parsed, not the reverse (!)
...
Fixes the order of include files in stats command.
2012-05-30 10:16:37 +00:00
Simon Michael
9735d583d1
extra postingsReport test
2012-06-29 18:35:32 +00:00