Simon Michael
57c31f5ab0
support basic --period expressions, containing a single smart date
2008-11-27 06:29:29 +00:00
Simon Michael
d25995c1c8
refactor with DateSpan
2008-11-27 04:31:01 +00:00
Simon Michael
b7616562d9
this/last/next month/quarter/year
2008-11-27 02:49:22 +00:00
Simon Michael
7858ed1327
this/next/last day/week
2008-11-27 01:49:13 +00:00
Simon Michael
884ebf2979
gather date stuff together, FuzzyDate -> SmartDate
2008-11-27 00:35:00 +00:00
Simon Michael
8c56c3c4b3
refactoring date parsing, FuzzyDate
2008-11-26 23:21:24 +00:00
Simon Michael
4d49177117
hacking in more date parsing.. today/tomorrow/yesterday
2008-11-26 04:51:15 +00:00
Simon Michael
6c88197c6a
do IO date parsing up front, and support (english) month names
2008-11-26 04:04:05 +00:00
Simon Michael
1c60514973
tighten up date parsing, make it io-friendly and parse Y, M/D, D
2008-11-25 23:52:42 +00:00
Simon Michael
dfe59676fb
support all five date comparisons in --display
2008-11-26 21:18:24 +00:00
Simon Michael
33b2deba75
correction, dates in display expressions should be in brackets
2008-11-25 18:47:26 +00:00
Simon Michael
0582046648
preliminary --display/-d support (-d "d>DATE", sufficient for reconciling)
2008-11-24 21:51:31 +00:00
Simon Michael
06aeefdbf7
test register report with account pattern
2008-11-24 21:41:21 +00:00
Simon Michael
565feb594e
add a --verbose/-v flag, use it to show more test-running detail
2008-11-22 04:49:00 +00:00
Simon Michael
1607661b87
fix the print command
2008-11-22 06:35:10 +00:00
Simon Michael
d5a145f7e4
test noodling
2008-11-22 20:35:36 +00:00
Simon Michael
27c1f06055
make --depth activate -s like ledger's -d'<=N'
2008-11-23 21:21:18 +00:00
Simon Michael
52ff46a326
--basis/-B flag, to show all priced amounts on cost basis. Also a --cost alias.
2008-11-22 20:35:17 +00:00
Simon Michael
7362fbd730
begin smart date parsing
2008-11-22 12:18:19 +00:00
tim
60b4610c2f
Fix bug in parsing of TimeLogs, and enabled a test case for them
2008-11-12 07:17:31 +00:00
Simon Michael
10263ac6d9
test cleanup
2008-11-22 09:23:10 +00:00
Simon Michael
86b510917d
quick --depth option, a hledger feature
2008-11-22 13:11:54 +00:00
Simon Michael
6fc8cdfe3e
-n flag for balance command
2008-11-22 09:46:57 +00:00
Simon Michael
42bfc4afd9
--empty/-E flag
2008-11-22 09:39:58 +00:00
Simon Michael
9d47496d37
refactor balance tests
2008-11-22 06:09:44 +00:00
Simon Michael
f831064644
convert multi-line strings to non-slash style for now so I can use sp to auto-build
2008-10-17 01:29:53 +00:00
Simon Michael
c46189a75b
filter by account patterns when caching a ledger, fix balance report totals
2008-11-22 05:51:48 +00:00
Simon Michael
ea5a87815b
rename setAmountDisplayPrefs to canonicaliseAmounts
2008-11-08 22:02:38 +00:00
tim
514f015849
Implemented types for dates and datetimes
...
This patch replaces the strings used in the Entry, TimeLogEntry, and Transaction
records with real types. Rather than use the inbuild system date and time types
directly, two custom types have been implemented that wrap UTCTime: Date and
DateTime. A minimal API for these has been added.
2008-11-11 12:34:05 +00:00
Simon Michael
c75da36d8d
eight balancereportacctnames tests and some cleanup
2008-11-22 04:38:27 +00:00
Simon Michael
14168d90e3
update a test
2008-11-22 04:49:49 +00:00
Simon Michael
243d5c3086
add a test demonstrating negative account pattern bug
2008-11-21 19:09:42 +00:00
Simon Michael
7a71f137ee
add a test for account filtering affecting balance report totals
2008-11-22 04:50:23 +00:00
Simon Michael
5df70bb3f4
rename --showsubs to --subtotal, like ledger
2008-10-17 16:58:09 +00:00
Simon Michael
33f06f334e
first attempt at storing per-amount price
2008-11-22 16:26:01 +00:00
Simon Michael
83d36dae63
more tests cleanup, and start to move match functions to Utils
2008-11-22 04:44:12 +00:00
Simon Michael
96e0f70a38
use the greatest precision detected for a commodity, not the first one
2008-11-08 21:44:41 +00:00
Simon Michael
c00a1811c5
add a test for setAmountDisplayPrefs precision handling
2008-11-08 20:26:56 +00:00
Simon Michael
0b23598138
remove the hard-coded rate from Commodity
2008-10-18 10:46:49 +00:00
Simon Michael
80beac7d43
try making MixedAmount a full newtype, to avoid TypeSynonymInstances error
2008-10-18 10:38:01 +00:00
Simon Michael
648887b36f
use MixedAmount everywhere. seems to work.
2008-10-18 08:39:08 +00:00
Simon Michael
d31ba41703
rename and unify the autofill stuff
2008-10-18 06:45:02 +00:00
Simon Michael
0eb56821e9
fix register report and add a test
2008-10-18 03:19:50 +00:00
Simon Michael
a1d10691a3
more code cleanups
2008-10-18 02:43:13 +00:00
Simon Michael
dce8fd0dde
parse virtual and balanced virtual transactions, refactor register and transaction output
2008-10-16 06:00:46 +00:00
Simon Michael
2711474bc9
"hledger test" now accepts ledger-style name patterns, to run a subset of tests
...
Eg: hledger test amount, hledger test -'balance report'
2008-11-21 18:45:09 +00:00
Simon Michael
a56da854b3
add a register command test
2008-10-15 21:10:36 +00:00
Simon Michael
84e093fff1
reindent tests, now using haskell-indentation.el
2008-10-15 17:56:58 +00:00
Simon Michael
9957335f9c
remove dead code
2008-10-15 17:56:34 +00:00
Simon Michael
5fcab59414
support negative patterns and ledger's special balance report account matching rule
2008-10-15 17:04:47 +00:00
Simon Michael
8306c2f6b3
tweak testrunner
2008-10-15 08:13:29 +00:00
Simon Michael
1e3291af48
focus on tests in Tests.hs, clean up
2008-10-15 06:32:52 +00:00
Simon Michael
7a69efec70
match full account name when (any) account pattern contains :, as ledger seems to
2008-10-15 06:32:42 +00:00
Simon Michael
042a8179e8
always give a proper parse error for numbers, remember precisions and thousands separators
...
(per amount for now)
2008-10-14 23:14:31 +00:00
Simon Michael
4efdda25b4
replace Currency with a more flexible, ledger-style Commodity
2008-10-12 21:52:48 +00:00
Simon Michael
80ef214f79
nicer ghci/repl usage, update docs
2008-10-12 09:17:21 +00:00
Simon Michael
01cd388c24
remove dead code, simplify cacheLedger again
2008-10-12 07:46:54 +00:00
Simon Michael
b9b9ce7d51
another balance report test, another step closer
2008-10-12 06:45:54 +00:00
Simon Michael
220b688082
another test
2008-10-12 05:09:01 +00:00
Simon Michael
d7db5660b9
perhaps getting closer to a ledger-compatible balance report. A wretched, wretched thing.
2008-10-11 04:23:49 +00:00
Simon Michael
2cef939da1
rename accounts/filteraccounts fields to accountmap/filteraccountmap
2008-10-10 22:28:10 +00:00
Simon Michael
9dc9c9dd76
remove dead code, rename function
2008-10-10 12:04:20 +00:00
Simon Michael
a30154b401
pruneBoringBranches again, a test, and fix hiding of zero-balance leaf accounts
2008-10-10 11:55:12 +00:00
Simon Michael
19fbe17ff4
test labels
2008-10-10 11:12:54 +00:00
Simon Michael
77b7de1b5f
add four (failing) tests for balance report
2008-10-10 10:05:12 +00:00
Simon Michael
37e75d610e
more tests cleanup.. prepare for per-module tests, but consolidate in Tests where I think we will stay
2008-10-10 08:16:55 +00:00
Simon Michael
d98643a364
tests cleanup
2008-10-10 07:39:20 +00:00
Simon Michael
67c203f316
move commands to top-level modules, make Ledger pure (except for Parse)
2008-10-10 03:32:12 +00:00
Simon Michael
73c49ec060
reduce unnecessary imports
2008-10-10 02:19:53 +00:00
Simon Michael
11342db662
simplify filtering, make cacheLedger store filtered data as well, make balance reports work a little better
2008-10-09 13:02:26 +00:00
Simon Michael
fa1b4bdfa2
rename parseError, parsePatternArgs, fix a bug
2008-10-08 18:02:34 +00:00
Simon Michael
91802391a1
um.. refactor option handling, filtering, and support -b/-e date filtering options
2008-10-08 17:00:22 +00:00
Simon Michael
b0e8286411
name hunit tests
2008-10-03 10:23:02 +00:00
Simon Michael
cf194e6b60
rename showLedgerAccounts to showLedgerAccountBalances
2008-10-03 07:47:36 +00:00
Simon Michael
a7b1269d86
define Ledger's exports
2008-10-03 07:38:46 +00:00
Simon Michael
e5834ffe2f
minor cleanups.. time to go
2008-10-03 03:38:33 +00:00
Simon Michael
3aa656ba69
rename LedgerEntry to Entry
2008-10-03 02:37:19 +00:00
Simon Michael
b19fe33476
replace Models with a top-level Ledger module
2008-10-03 01:14:16 +00:00
Simon Michael
c699b979f8
move the rest of the core code to the Ledger package
2008-10-03 00:40:06 +00:00
Simon Michael
627f78a730
first step towards a library, move Utils to Ledger.Utils
2008-10-03 00:05:16 +00:00
Simon Michael
99358f207b
rename LedgerTransaction to RawTransaction
2008-10-02 23:55:01 +00:00
Simon Michael
f4b4fc98fe
rename LedgerFile to RawLedger
2008-10-02 22:17:04 +00:00
Simon Michael
8b117e1581
more ledger-handling-functions cleanup
2008-10-01 12:48:52 +00:00
Simon Michael
8c6d93701b
try to simplify FilterPatterns a bit
2008-10-01 11:08:30 +00:00
Simon Michael
0eceeb5542
basic support for a comments-preserving print command.
...
Preserves most inter-entry comment lines and whitespace (but not yet a
comment immediately after an entry, or whitespace/comments after the last
entry.) Whitespace and comment lines are stored as part of the following
entry. Lines after the last entry are stored as an extra ledger file field.
Inspired by Nafai on #ledger.
2008-06-28 04:44:33 +00:00
Simon Michael
e08b2c1ea6
remove unused functions
2007-07-11 08:24:32 +00:00
Simon Michael
d52b365fa0
combine patterns into single regexps, fix a bug with print & patterns
2007-07-11 06:58:47 +00:00
Simon Michael
ce0d4ec85a
clean up account/description pattern handling
2007-07-11 05:46:20 +00:00
Simon Michael
2b608a6c9c
remove obsolete code, cleanups
2007-07-09 18:54:41 +00:00
Simon Michael
ec1b5b9bce
balance: combine boring account names properly when matching account patterns
2007-07-07 18:26:28 +00:00
Simon Michael
6dc6186c0d
save and print entry and transaction comments
2007-07-04 12:05:54 +00:00
Simon Michael
a1b060f4cf
renamed types: RawLedger, Entry, Transaction, EntryTransaction -> LedgerFile, LedgerEntry, LedgerTransaction, Transaction
2007-07-04 09:51:37 +00:00
Simon Michael
f0ec7b08a3
track amount precision, and use the highest precision found for display; parsing fixes
2007-07-04 01:38:56 +00:00
Simon Michael
a266a9b2e0
show numbers with thousands separator
2007-07-03 19:01:13 +00:00
Simon Michael
0445086286
tests cleanup
2007-07-03 18:20:45 +00:00
Simon Michael
255e061e6f
fix non-display of single-child accounts when balance report depth is restricted, test support
2007-07-03 17:25:16 +00:00
Simon Michael
d760acc85e
speed, cleanup
2007-07-03 08:46:39 +00:00
Simon Michael
362d3831ea
rename ledger functions
2007-07-02 19:39:34 +00:00
Simon Michael
bd84e95f5e
rename Ledger -> RawLedger, CachedLedger -> Ledger
2007-07-02 19:15:39 +00:00
Simon Michael
df55743697
CachedLedger
2007-07-02 18:57:37 +00:00