Simon Michael
4aafeb32e6
refactor: clean up Posting construction
2012-12-06 00:03:07 +00:00
Simon Michael
8b4a99c4d5
79: convert: add a skip-lines directive (Magnus Henoch)
2012-11-18 18:21:52 +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
1c1058be4e
70: ignore ledger's fixed lot price declarations
2012-11-17 02:40:27 +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
34318906d8
register, print: fix reverse ordering of same-day transactions
2012-06-29 18:06:58 +00:00
Simon Michael
9b3486c14c
docs: fix incorrect haddock
2012-04-14 01:11:11 +00:00
Simon Michael
36534a9ef5
fix a misnamed var
2012-04-16 16:43:58 +00:00
Simon Michael
d30cd5847a
a simplistic cashflow statement to complete the trio
2012-04-17 17:32:56 +00:00
Simon Michael
294a350993
promote Hledger.Query to second level
2012-05-16 07:57:10 +00:00
Simon Michael
c1e8138609
more date utilities
2012-05-19 02:56:26 +00:00
Simon Michael
a03fd1d89f
fix haddock complaints
2012-05-27 18:20:18 +00:00
Simon Michael
1062e2f9a4
clean up reader selection, don't write a csv rules file on journal parse error
2012-05-28 18:40:36 +00:00
Simon Michael
88f69e12e2
fix Dates exports for hledger-web
2012-04-16 17:09:27 +00:00
Simon Michael
a5b3f072b4
update query parser's prefix list
2012-05-29 17:02:18 +00:00
Simon Michael
e0d2530ff5
fix double quote matching everything
2012-05-29 17:02:57 +00:00
Simon Michael
cb905a741c
new query by tag implementation
2012-05-28 00:27:55 +00:00
Simon Michael
2fb2aea056
rename metadata fields to tags
2012-05-27 22:59:06 +00:00
Simon Michael
3ee6a351f3
big query/tests/show refactoring
...
- use new query system for command line too, filterspec is no more
- move unit tests near the code they test, run them in bottom up order, add more
- more precise Show instances, used for debugging not ui
2012-05-27 18:14:20 +00:00
Simon Michael
2f28931d83
fix build warnings in hledger-lib
2012-05-06 20:42:34 +00:00
Simon Michael
68966fe43b
begin cleaning up Dates api, move firstJust
2012-04-16 16:44:41 +00:00
Simon Michael
56cf9b21cb
fix txn & posting comment parsing & printing; better unit tests
2012-05-15 01:49:05 +00:00
Simon Michael
2feb36e57f
query cleanups
2012-05-17 16:02:22 +00:00
Simon Michael
ddda6705c0
put query parsers first
2012-05-16 08:28:02 +00:00
Simon Michael
a58a5f96ad
more robust comments & metadata, on postings too, and document as "tags"
2012-05-14 18:52:22 +00:00
Simon Michael
88212f26e8
simplify journal parser names
2012-05-09 15:34:05 +00:00
xiaoruoruo
ce83876700
metadata parse and show for transaction
2012-04-08 19:13:56 +00:00
Simon Michael
c010448935
drop little-used clashing Ledger accessors
2012-05-09 15:33:16 +00:00
xiaoruoruo
dafa764a07
filter by metadata tag
2012-04-08 20:43:48 +00:00
Simon Michael
b6b5c5ffaa
explicit exports for Transaction and Posting
2012-05-07 14:36:40 +00:00
Simon Michael
770136ec81
query tests cleanup
2012-05-17 14:59:38 +00:00
Simon Michael
08bbb832d0
more query cleanup
2012-05-16 07:50:22 +00:00
Simon Michael
e1b1b8bce8
rename Matcher to Query, simplify constructors
2012-05-16 07:12:49 +00:00
Simon Michael
b4b2b67236
incomestatement: show revenue and expense accounts separately
2012-04-15 00:05:10 +00:00
Simon Michael
a27eb7c29f
more matcher -> query renaming
2012-05-16 07:37:24 +00:00
Simon Michael
a7ef0ba8dd
basic understanding of balance sheet vs. profit & loss accounts
2012-04-14 01:12:42 +00:00
Simon Michael
51977f32e9
Journal.hs explicit exports, haddockification
2012-04-13 22:24:55 +00:00
Simon Michael
04dc5aed10
explicit imports for Matching
2012-05-16 06:43:13 +00:00
Simon Michael
43d78398bb
Hledger.Data.Matching -> Hledger.Data.Query
2012-05-16 06:50:08 +00:00
Simon Michael
d4451ce5e3
read system cleanup, require conversion rules from a file to simplify API
2012-03-24 18:08:11 +00:00
Simon Michael
00a43cd1bf
Hledger.Cli.Format -> Hledger.Data.FormatStrings
2012-03-10 19:20:15 +00:00
Simon Michael
e396c0dc8d
push csv rule and format string types down
2012-03-24 01:58:34 +00:00
Simon Michael
6eb7ad28e1
refactor/beef up readJournal/readJournalFile
2012-03-23 16:21:41 +00:00
Simon Michael
2e8cf1c7f2
reader code cleanups
2012-03-10 18:13:32 +00:00
Simon Michael
9bdb170a0a
inferred amounts use the cost commodity if known, like ledger ( #69 )
2012-01-03 08:15:48 +00:00
Simon Michael
470155dc63
docs: I don't think journalCanonicaliseAmounts affects price amounts
2012-01-03 08:17:04 +00:00
Simon Michael
41c1fa636a
parsing: -B/--cost now ignores P historical prices, like ledger
2012-01-22 20:39:11 +00:00
Simon Michael
1bc4d4b395
refactor: clarify mixed amount normalising a bit
2012-01-01 00:39:13 +00:00
Simon Michael
3e3475bd76
web: fix "not:'multi word'" patterns
2011-09-21 00:28:32 +00:00
Simon Michael
c22e4e85d0
register: be better at showing empty intervals with --empty and a query pattern
2011-09-23 00:09:39 +00:00
Simon Michael
35f3a4fa00
print, web: always show both dates, ignoring --effective ( #42 )
...
Ledger shows only the effective date with --effective, but not vice versa.
print is supposed to be information-preserving so this seems better.
This also fixes the web entries view.
2011-09-23 14:50:20 +00:00
Simon Michael
9a0a0be01c
docs: whitespace
2011-09-23 14:27:26 +00:00
Simon Michael
1de9cc1d80
fix a regression balancing a transaction containing different prices
...
And try to clarify amount arithmetic a bit more. More to come I expect.
2011-09-03 21:27:37 +00:00
Simon Michael
35dcda9e8b
fix case insensitivity of command-line filter patterns
2011-06-08 21:52:10 +00:00
Simon Michael
238594d976
type signature for nullposting so tags can find it
2011-06-13 20:59:13 +00:00
Simon Michael
4e9c09fb87
refactor
2011-06-14 14:27:48 +00:00
Simon Michael
4228c901e8
change nulldate
2011-06-14 19:10:16 +00:00
Simon Michael
e36616999d
haddock correction: entry is a synonym for transaction, not posting
2011-06-17 18:18:03 +00:00
Simon Michael
92777edc99
docs: haddock tweaks
2011-04-29 03:25:52 +00:00
Simon Michael
2aedd32690
journalAccountNamesUsed should be sorted
2011-07-17 15:54:21 +00:00
Simon Michael
9db32e0f60
haddock fix
2011-07-17 23:14:51 +00:00
Simon Michael
55033b6e79
mkdatespan haddock
2011-07-17 15:54:58 +00:00
Simon Michael
47a9564bdb
showJournalDebug
2011-08-02 23:27:41 +00:00
Simon Michael
3364d344d1
refactor: simplify matchers, dropping sense argument
2011-08-07 15:31:00 +00:00
Simon Michael
68c2d0f513
fix matcher parse tests
2011-06-13 21:12:35 +00:00
Simon Michael
789be240b6
fix edate: matcher, should match actual date if no effective date defined
2011-07-01 17:20:04 +00:00
Simon Michael
77ca58269a
misc helpers
2011-08-07 15:31:36 +00:00
Simon Michael
c24609f468
refactor fixSmartDate*
2011-08-14 22:39:48 +00:00
Simon Michael
931c64221e
more useful parse error from fixSmartDateStr
2011-08-08 01:34:43 +00:00
Simon Michael
68f13e18af
amount haddock updates
2011-08-31 17:22:53 +00:00
Simon Michael
676845b269
trim even more fat from amounts
2011-08-31 17:44:20 +00:00
Simon Michael
06e224dc4a
haddock updates
2011-08-31 17:44:31 +00:00
Dmitry Astapov
2c01541de1
Fix for auto-balancing transactions which have negative amount in the first posting
2011-04-24 22:10:33 +00:00
Simon Michael
b32ee2fa04
fix/rename convertMixedAmountToCommodity, yay release tests
2011-09-02 00:42:41 +00:00
Simon Michael
10fd7ebc42
simplify amounts code, make tests pass
2011-08-31 16:54:10 +00:00
Simon Michael
1273f02a9a
more balance/amount clarifications and a test
2011-08-30 11:37:36 +00:00
Simon Michael
059825a9b2
optionsgeddon.. port to cmdargs and a fully modal cli
2011-08-15 22:50:09 +00:00
Simon Michael
35f145f03d
web: 1. move templates back into main code 2. begin adding content titles
2011-07-01 20:37:48 +00:00
Simon Michael
3dccfcad68
web: show account+subs by default
2011-07-01 00:32:09 +00:00
Simon Michael
05cd38458b
web: fix inacctsonly: with spaces
2011-06-24 19:15:00 +00:00
Simon Michael
4bb0f2efbd
web: "empty:" to select postings with zero or non-zero amount
2011-06-29 00:53:31 +00:00
Simon Michael
6b92997487
web: "real:1" to select real postings (or transactions with real postings)
2011-06-29 00:31:37 +00:00
Simon Michael
11409bb834
web: "status:" to filter by cleared status
2011-06-28 23:18:36 +00:00
Simon Michael
8d0b42e1d5
web: an "a" parameter specifies a query expression for filtering the accounts sidebar
...
Useful for ui experiments, at least
2011-06-28 22:34:45 +00:00
Simon Michael
d343614690
web: "inacctsonly:" narrows the sidebar to current account and subs
2011-06-24 18:52:40 +00:00
Simon Michael
d5ab811796
web: inacctsubs: -> inaccts:
2011-06-14 19:21:22 +00:00
Simon Michael
d35fbac422
web: inacctsubs: includes subs in an account register, with confusing balance
2011-06-14 14:29:31 +00:00
Simon Michael
94208e44d5
fix that silly pattern warning
2011-06-13 21:16:10 +00:00
Simon Michael
0c216cb2cd
distinguish query search criteria (like acct:) and query options (like inacct:)
2011-06-13 19:46:35 +00:00
Simon Michael
06331c71a8
account register balance not right.. more fixes and plans
2011-06-12 22:35:54 +00:00
Simon Michael
94709e5139
preliminary single-account register report
2011-06-11 16:11:38 +00:00
Simon Michael
d2e6b8cbae
query parser fixes, add date: and edate: matching
2011-06-12 18:30:18 +00:00
Simon Michael
957c349780
--alias command-line option
2011-08-05 00:05:39 +00:00
Simon Michael
30b7448f45
parsing: alias/end aliases directives, like ledger's but a bit more powerful
2011-08-04 08:45:18 +00:00
Simon Michael
4015e02097
account directive should preserve virtual/balanced virtual posting type
2011-08-02 23:29:13 +00:00
Simon Michael
d4545966b5
amount code, test cleanups
2011-08-31 00:40:21 +00:00
Simon Michael
379184fd31
Amount haddock & code cleanups
2011-08-30 13:16:30 +00:00
Trygve Laugstol
28dbb8864f
Adding basic ledger FORMAT parser.
2011-06-20 21:33:26 +00:00
Simon Michael
96aa9bfc76
matcher improvements, tests
2011-06-11 18:35:20 +00:00
Simon Michael
6a185bc51f
refactor: abstract regular expression lib
2011-06-05 18:31:19 +00:00
Simon Michael
5084280879
imports, api cleanup
2011-05-28 04:11:44 +00:00
Simon Michael
b344f797d3
whitespace/quoting utilities
2011-06-05 18:34:12 +00:00
Simon Michael
bea6fb7464
matcher enhancements for account register
2011-06-11 16:00:00 +00:00
Simon Michael
a9eb8b57c2
fix warnings
2011-06-07 06:18:23 +00:00
Simon Michael
9734ed47a6
web: acct: -> in:/inacct:, match only one account (CI exact string match on full name), old acct: re-enabled
2011-06-08 22:02:49 +00:00
Simon Michael
f7956d1ab7
web: account matching works like --related by default; dim excluded accounts
...
A step closer to working like standard accounting programs where you click
an account to see transactions "in" that account. acct:PAT (or just PAT)
now matches the other postings in transactions matching the account
pattern, like ledger --related. When matching an account (or several) this
way, the unmatched accounts are dimmed to clarify what's happening.
Still to do: fix the sign of the running total, and find out how this
style of search will really coexist with the other ways of searching.
2011-06-07 06:11:38 +00:00
Simon Michael
32a1b921df
consolidate new matching support
2011-06-05 18:36:32 +00:00
Simon Michael
aa41350a16
begin more powerful query expressions (filter patterns)
2011-06-03 23:14:26 +00:00
Simon Michael
dc7a692a19
refactor: remove costbasis and whichdate from FilterSpec
2011-06-03 02:14:36 +00:00
Omari Norman
4ec0cc474f
Fix postingCleared for individually-cleared postings
...
The previous code simply looked directly to the parent transaction's
status to determine whether the posting was cleared. This gave
erroneous information for postings that were individually cleared
even though the parent transaction was not cleared.
2010-12-26 22:39:28 +00:00
Simon Michael
2b1ea5160f
change of mind: "every Nth X of Y" intervals' length shall be Y, not X
2011-01-14 05:01:00 +00:00
Simon Michael
810c6a5dac
print: don't show a trailing space when description is blank
2011-01-19 18:55:16 +00:00
Simon Michael
0cda8e4c3f
add appendFile and hGetContents support to utf8 layer
2011-01-21 01:09:46 +00:00
Simon Michael
46422a7460
copy JGM's utf8 IO module from pandoc
2011-01-21 01:08:12 +00:00
Simon Michael
6a845eb5e4
i18n: always read and write UTF-8, ignoring current locale ( #34 )
...
Also remove a bunch of CPP conditions.
Uses the GHC-version-independent UTF-8 layer from pandoc.
2011-01-21 01:24:51 +00:00
Simon Michael
5f1ebc694a
parsing: assume current year when transaction dates have no year and there is no default year
2011-03-11 18:45:57 +00:00
Simon Michael
505d677461
docs: haddock fixes
2011-04-18 06:36:00 +00:00
Simon Michael
9bae97821a
really support "every N Xs" reporting intervals, also "every N(st|nd|rd|th) day of (month|week)"
2011-01-14 04:32:08 +00:00
Simon Michael
e96dfc639e
support "every N day/week/month/quarter/years" reporting intervals
2011-01-14 02:35:00 +00:00
Simon Michael
6de45f7d16
support "biweekly" and "bimonthly" reporting intervals
2011-01-14 01:22:53 +00:00
Simon Michael
b2f439eb11
try showing integral "maxprecision" amounts without the .0 (except in add's defaults, where it helps)
2011-01-20 00:17:32 +00:00
Simon Michael
bfe935e18c
fix a sign bug with negative total-priced (@@) amounts
2011-04-22 13:40:55 +00:00
Simon Michael
091ec4e51f
clarify that amount arithmetic does not handle multiple commodities
2011-04-22 13:44:08 +00:00
Simon Michael
137cc8292e
amount cleanups
2011-01-19 23:27:11 +00:00
Simon Michael
b159f74a4c
zero amounts have no sign or commodity, and amounts with different prices are aggregated, like ledger
2011-04-22 13:50:05 +00:00
Simon Michael
1c7ad7f421
parsing: more careful validation of eg leap years in transaction dates (only)
2011-04-22 13:55:42 +00:00
Simon Michael
33bedcbab0
parsing: infer a conversion price in unpriced two-commodity transactions
2011-01-20 00:18:54 +00:00
Simon Michael
d3663b818e
parsing: better international number format support ( #32 )
...
This allows period and comma to be used for decimal point and digit group
separator or vice versa, and also flexible digit groups. See
http://en.wikipedia.org/wiki/Decimal_separator . Digit group separators
are possibly not worth the trouble and might not stay.
2011-01-19 12:32:18 +00:00
Simon Michael
dd9e78a67a
reorganize tests
2010-12-27 20:26:22 +00:00
Simon Michael
e03ada3bd3
parsing: support @@ syntax specifying total price
2011-01-15 02:04:53 +00:00
Simon Michael
0d6e696699
some more tests and fixes for amount & price display precision
2010-11-14 23:29:04 +00:00
Simon Michael
811e71aba7
price precisions don't influence display precision; balancing is based on display precision ( #23 )
...
Like ledger, price amounts are now "unobserved", ie their precision does
not affect the canonical display precisions used when displaying amounts,
and transaction balancing is done based on display precision, ie amounts
are considered to balance if their sum appears to be zero when using the
canonical display precision.
2010-11-14 22:44:37 +00:00
Simon Michael
1551a6914b
still more amount display helpers
2010-11-13 15:10:06 +00:00
Simon Michael
e707f97847
parsing: parse transaction and posting metadata, though we don't use it yet
2010-11-13 22:17:32 +00:00
Simon Michael
17d5acf64b
refactor: more reader cleanups
2010-11-15 07:18:35 +00:00
Simon Michael
4e672f1722
comments
2010-11-19 17:25:39 +00:00
Simon Michael
d6c2cf6a90
parsing: save final parse context with journal
2010-11-13 15:03:40 +00:00
Simon Michael
7714bab58d
web: offer a choice of files to edit when there are multiple (included) files
2010-09-24 01:56:11 +00:00
Simon Michael
78db98366f
parsing: support D default commodity directive
2010-11-12 23:54:21 +00:00
Simon Michael
8429df0f32
remember all included file paths, if any
2010-09-22 23:02:19 +00:00
Simon Michael
96036e56a0
docs: comments
2010-09-22 21:51:25 +00:00
Simon Michael
c42496b134
sign testing for amounts
2010-07-27 23:20:20 +00:00