Commit Graph

577 Commits

Author SHA1 Message Date
Simon Michael
647d5833ff clarify dbgAtM issue 2014-07-02 23:24:58 -07:00
Simon Michael
330dfe6891 commodity & amount style parser cleanups, part 2 2014-07-02 17:41:33 -07:00
Simon Michael
9b4b85b4bf commodity & amount style parser cleanups 2014-07-02 11:23:30 -07:00
Simon Michael
8ae303f685 assert only a single commodity, like Ledger (fixes #195)
This change means you can make assertions on a multi-commodity account
balance (asserting one commodity at a time). On the flip side, you can
no longer assert the complete balance of an account (new unexpected
commodities will not be detected.) We might restore that ability later,
using the == syntax.
2014-07-02 07:35:06 -07:00
Simon Michael
0c3148ac7b add an --ignore-assertions flag
Can be helpful when reading Ledger files, where assertions may have
different semantics; or for getting some answers from your journal
to help you fix your assertions.

Could be called --no-assertions, but this might create surprise when it
has an effect contrary to --no-new-accounts.

I had to add another flag throughout the parsers & journal read
functions, ok for now.
2014-07-01 18:26:37 -07:00
Simon Michael
04cfdac0ce query: add >= and <= for amt queries 2014-06-29 11:09:13 -07:00
Simon Michael
5af4ef33ab web: fix a warning 2014-06-13 00:21:26 +01:00
Simon Michael
ec51d28839 web: a bunch of ui cleanup & improvement
- the web UI has been streamlined; edit form, raw & entries views dropped
- we now remember whether sidebar is open or closed
- better help dialog
- keyboard shortcuts are now available
- better add form
- more bootstrap styling
- static file cleanups
- report filtering fixes
- upgrade jquery to 2.1.1, bootstrap to 3.1.1, drop select2, add typeahead, cookie, hotkeys
- clarify debug helpers a little
- refactoring
2014-06-13 00:19:00 +01:00
Simon Michael
b22cb66319 refactor amount filtering helpers 2014-05-23 13:10:36 -07:00
Simon Michael
cf3d21afef csv and general reader fixes, cleanups
- The CSV reader no longer writes a "(stdin).rules" file when reading
  from stdin.

- Selection of reader(s) is now smarter when input is coming from stdin.
  Previously, all readers were considered applicable for stdin.  This
  meant that when reading a CSV file from stdin, the journal and timelog
  readers were always tried first, and if the CSV file was unparseable,
  you'd see the first (journal) reader's error instead of the CSV
  reader's.  Now, the readers do some basic content sniffing when
  reading stdin, so it generally tries only the one right reader and
  we'll see the right errors.

- The read system now has more debug output.
2014-05-09 17:55:32 -07:00
Simon Michael
6871c4cce5 dbgtrace, does a trace if --debug was used 2014-05-09 17:52:23 -07:00
Simon Michael
25ccead21c register: also fix date (or date2) sorting of postings (#184) 2014-05-08 14:20:12 -07:00
Simon Michael
2bd785c3fb aregister: fix date filtering with disordered txns (fixes #184)
Fix a refactoring-related regression that the tests missed: if
transactions were not ordered by date in the journal, register
could include postings before the report start date in the output.
2014-05-07 06:31:34 -07:00
Simon Michael
88f18adbc4 show posting dates in debug output 2014-05-06 21:35:38 -07:00
Simon Michael
4740c7082e csv: allow an empty first name in fields list (fixes #178) 2014-05-03 15:05:35 -07:00
Simon Michael
dedd26bbf5 csv: don't count fields in skipped lines (fixes #177) 2014-05-03 14:54:15 -07:00
Simon Michael
a28d4fd400 register: drop --display, use --historical instead
We provided a very limited implementation of --display only for one use
case: to see an accurate running balance. Now that is achieved more easily
with -H/--historical, similar to the balance command, and --display
can be dropped.
2014-04-30 17:24:41 -07:00
Simon Michael
0132ed7bea balance: a fix for starting balance with --date2 2014-04-30 17:20:02 -07:00
Simon Michael
70ad5b26ff journal: really don't parse + before an amount as part of the commodity (fixes #181 harder) 2014-04-30 11:28:47 -07:00
Simon Michael
8341b4a8d3 journal: don't parse + before an amount as part of the commodity (fixes #181) 2014-04-30 11:21:01 -07:00
Simon Michael
084bf8fea8 queries: treat amt:>0 like amt:>+0
Similar to the special case for amt:<0, for convenience.
To test that the absolute quantity is greater than 0, ie that the
quantity is non-zero, use not:amt:0.
2014-04-27 23:59:11 -07:00
Simon Michael
eeb48c86d1 default report dates come from secondary dates with --date2 2014-04-24 14:44:30 -07:00
Simon Michael
3ed82bd231 default report dates now include postings dated outside the transaction dates span
journalDateSpan now looks at posting dates as well as transaction dates.
2014-04-24 14:28:20 -07:00
Simon Michael
c9d60fab73 balance, register: fix --date2 with report intervals 2014-04-19 15:54:58 -07:00
Simon Michael
4ef33c012a register: report intervals now include all postings in the interval
As with balance. For example, register -p 'weekly in jan' generates
these intervals: 2013/12/30-2014/01/05, 2014/01/06-2014/01/12,
2014/01/13-2014/01/19, 2014/01/20-2014/01/26, 2014/01/27-2014/02/02.
With this change, postings on 2013/12/30-31 and 2014/2/1-2 will be
included in the report, so all period totals are complete and
comparable.
2014-04-19 11:47:05 -07:00
Simon Michael
6af5e6fe06 note potentially useful interval algebra link 2014-04-19 11:45:47 -07:00
Simon Michael
d0461c3ef7 cleanup 2014-04-19 11:26:01 -07:00
Simon Michael
3dd0894349 fix a warning 2014-04-19 11:25:45 -07:00
Simon Michael
6743f8c2a1 balance: multicolumn now includes all postings in the displayed periods 2014-04-19 08:45:46 -07:00
Simon Michael
1fca3e7472 orDatesFrom -> spanDefaultsFrom 2014-04-19 08:38:03 -07:00
Simon Michael
01e5a2245d clarify balance assertion error slightly 2014-04-16 14:45:41 -07:00
Simon Michael
f0167013ce queries: treat amt:<0 like amt:<+0 as a convenience 2014-04-16 10:48:56 -07:00
Simon Michael
dd1f58b785 balance: oops, note multicolumn reports not yet using all period data
87e2d49 seems to work only in GHCI, gives <<loop>> when compiled.
2014-04-15 17:19:55 -07:00
Simon Michael
9d10cfa180 fix single-quote-containing addon arguments harder 2014-04-15 13:07:43 -07:00
Simon Michael
0d1d3ed057 fix an error when running an addon with an argument containing a single quote
More crazy quote engineering.. seems more robust than before.
2014-04-15 11:45:30 -07:00
Simon Michael
87e2d49714 balance: multicolumn reports now use all data in the displayed periods
Previously, the first period's heading would show the start date of a
full period, but postings after this date but before the user-specified
report start date were not shown. Now those postings will be included,
making the first column's numbers more correct. Similarly, the report
end date is now adjusted to the displayed end date on the last column.
2014-04-14 13:10:34 -07:00
Simon Michael
d008c810dc balance: restore prefix on debug output from multibalance reports 2014-04-14 12:08:06 -07:00
Simon Michael
5885914547 refactor & use reportSpans 2014-04-14 08:31:57 -07:00
Simon Michael
020975555e clarify splitSpan function 2014-04-14 08:31:34 -07:00
Simon Michael
746f22458f fix a warning 2014-04-14 08:31:11 -07:00
Simon Michael
a761ae5b86 balance: support --date2 in multicolumn reports (cf #174) 2014-04-13 15:14:07 -07:00
Simon Michael
424db9a09e register: support --date2 with a report interval (fixes #174) 2014-04-13 14:57:40 -07:00
Simon Michael
2af04ec2fc balance: merge/improve multicol report implementations
Periodic, cumulative and historical multicolumn balance reports are now
generated by one code path, which helps with consistency and reducing
the bug/test surface. --tree now also works with --cumulative or
--historical.
2014-04-13 12:49:05 -07:00
Simon Michael
c93b19cb10 more debug utils, dbg0/dbg1/dbg2 2014-04-13 12:49:05 -07:00
Simon Michael
a4a332e64f drop sym: entirely in favour of cur: 2014-04-08 15:55:40 -07:00
Simon Michael
7d99ae5033 balance: --tree makes multicolumn reports show hierarchy
Multicolumn balance reports can now be switched to a hierarchical view
with --tree. This is similar to the single column balance report with
--no-elide, ie we do not elide boring parents into the following line.

The --flat and --tree flags are opposites; the last one to appear on
the command line is decisive (in future, if not already).
2014-04-06 21:56:47 -07:00
Simon Michael
349bb1db01 forgot to import nullamt 2014-04-06 07:43:04 -07:00
Simon Michael
b689b791e3 fix amt: false positives on multi-commodity amounts 2014-04-05 19:33:44 -07:00
Simon Michael
125a72f874 avoid a haddock crash 2014-04-04 09:09:00 -07:00
Simon Michael
029528519c remove out of date comment 2014-04-03 18:55:43 -07:00
Simon Michael
6a928a03a8 overhaul single- and multi-column balance reports
Changes include:

- flat mode now shows exclusive (subaccount-excluding) balances.
  This is a deviation from ledger, but seems simpler and clearer
  for users and implementors across the various modes.

- in flat mode, --depth now aggregates deeper accounts at the
  depth limit, rather than just excluding them from the report.
  This is more useful.

- in flat mode, --empty no longer shows parent accounts with
  no postings.

- more tests, more debug output, clearer code
2014-04-03 18:49:57 -07:00
Simon Michael
4dc61e76bf test and fix display of zero-balance leaves (fixes #170) 2014-04-03 18:49:57 -07:00
Simon Michael
cf254b0da3 show anumpostings in Account's show instance 2014-04-03 18:49:57 -07:00
Simon Michael
d21085cc6e an Account now knows how many postings it has 2014-04-03 18:49:57 -07:00
Simon Michael
2844333857 less debug output from some low-level functions 2014-04-03 18:49:57 -07:00
Simon Michael
f409f72899 force DateSpans to line-wrap better in debug output 2014-04-03 18:49:57 -07:00
Simon Michael
577ff7902c dbgAtM, monadic version of dbgAt 2014-04-03 18:49:56 -07:00
Simon Michael
21575ed47b more verbose Amount debug output at level 6+ 2014-04-03 18:49:56 -07:00
Simon Michael
874c467789 briefer mixed amount debug output below level 3 2014-04-03 18:49:56 -07:00
Simon Michael
a05810f8e0 dbgAt 2014-04-03 18:49:56 -07:00
Simon Michael
784e9eff8a dbg(ppshow) output improvements
- align single-line output a little better
- start multi-line output on a new line and indent it
2014-04-03 18:49:56 -07:00
Simon Michael
c5a839b309 3/4/5-tuple accessors 2014-04-03 18:49:56 -07:00
Simon Michael
b69e6c6946 unused extensions 2014-03-28 16:23:40 -07:00
Simon Michael
ef1cc06cab avoid pretty-show with GHC < 7.4; update tested-with (fixes #155)
hledger builds with GHC 7.2 through 7.8. 7.0 is not supported
because we require shakespeare which requires the DeriveGeneric extension.
2014-03-27 12:29:34 -07:00
Simon Michael
da0ce23144 don't let default commodity limit the max precision (fixes #169) 2014-03-26 17:25:59 -07:00
Simon Michael
882a9dbf1c cli, report & raw options cleanups 2014-03-25 19:03:56 -07:00
Peter Simons
6319ecd0b7 showDateSpan: remove redundant local definition of showDate 2014-03-22 12:03:00 +01:00
Peter Simons
a56231751f showDate: use '%0C' to get a two-digit century with time-1.4.0.1 or later 2014-03-22 12:02:22 +01:00
Simon Michael
25a8aa2970 fix hunit compilation warnings 2014-03-21 17:41:54 -07:00
Simon Michael
e99c3c4b01 queries: amt: compares unsigned by default, signed if number has + or - 2014-03-20 19:10:48 -07:00
Simon Michael
467c50e06c fix a redundant import 2014-03-19 17:32:35 -07:00
Simon Michael
77d24fc241 split up Hledger.Reports 2014-03-19 17:31:18 -07:00
Simon Michael
59cbc230d8 drop data-pprint for now, does not support ghc 7.8
The data-pprint and pretty-show packages used for debugging
tend to be poorly supported, drop one of them for now.
2014-03-19 16:11:46 -07:00
Simon Michael
bff69227f7 balance: more comment cleanups 2014-03-18 18:16:47 -07:00
Simon Michael
4d8d0d9aa6 balance: make BalanceReport more like MultiBalanceReport, doc cleanups 2014-03-18 18:01:24 -07:00
Simon Michael
e42e58fd26 the sym: prefix seems unintuitive, try cur: as an alias 2014-03-16 09:43:15 -07:00
Simon Michael
e97b8b20b8 balance: make sym: filtering work as expected in multicolumn reports 2014-03-16 09:40:51 -07:00
Simon Michael
712e6f1e36 register: fix tag: matching all sibling postings 2014-03-05 14:43:58 -08:00
Simon Michael
7291977e6f rename Format to StorageFormat 2014-03-02 13:37:10 -08:00
Simon Michael
dd2f293094 rename FormatString to OutputFormat
It was going to be Format, but that clashes with file format. Press on.
2014-03-02 13:33:56 -08:00
Simon Michael
6f49263c9b print: tag queries will match transactions whose postings contain the tag 2014-03-01 17:42:13 -08:00
Simon Michael
4b4715ab76 parsing: don't accept . as a valid amount 2014-03-01 10:26:20 -08:00
Simon Michael
46d594bada balance, register now filter more strongly by sym: 2014-02-27 17:47:47 -08:00
Simon Michael
73c09f91d7 queryFromOptsOnly for when args aren't query terms 2014-02-27 17:46:05 -08:00
Simon Michael
762a1b4d74 parsing: comments can also start with # in col 0 2014-02-27 11:47:36 -08:00
Simon Michael
431ef894e0 cli: clarify "hledger add" command in no journal file error 2014-02-12 09:15:21 -08:00
Simon Michael
d158d401d9 fix some breakages found by Hydra 2014-02-05 19:30:01 -08:00
Simon Michael
5223bc5c41 lib: rename and expose more journal file parsers 2014-02-05 18:55:38 -08:00
Simon Michael
dc8b687056 extra: hledger-rewrite script 2014-02-05 13:03:06 -08:00
Simon Michael
f87a68999f mention the often-overlooked 2-space rule in the too many missing amounts error 2014-01-24 15:28:37 -08:00
Simon Michael
d55f686f68 avoid a Text.Printf name collision with GHC 7.7+ (fixes #153) 2014-01-10 08:29:25 -08:00
Clint Adams
7f2ffe2e45 Use regex-tdfa instead of regex-compat-tdfa 2013-12-28 13:31:58 -05:00
Simon Michael
8261ac0f56 three fixes to handle --debug=N like --debug 2013-12-07 06:09:39 -08:00
Simon Michael
c53732a4af balance: new multi-column reports & documentation
Two new multi-column balance report modes show ending balance per
period: `--cumulative`, starting from 0, and `--historical`, starting
from the historical starting balance.

The balance command's specification has been clarified and consolidated
in the Balance.hs haddock. Reports.hs has also had haddock updates. The
old AccountsReport type is now BalanceReport, still used by
single-column balance report. The new MultiBalanceReport type is used by
the multi-column reports.
2013-12-07 05:43:31 -08:00
Simon Michael
13641eab66 debug level sets amount/journal show verbosity
Amounts and journal values are often rendered too verbosely in debug
output, obscuring what's important. Here we try adjusting the level
of detail in the Show instance based on the global debug level.
Needs more work.
2013-12-06 13:51:19 -08:00
Simon Michael
3cf53661f3 new debug helpers; --debug=N sets debugLevel
The debug level set by `--debug[=N]` is now available to pure and
startup code as debugLevel, using unsafePerformIO.

`dbg LABEL ...` is now the go-to helper for tracing values on the
console; it produces output when the debug level is non-zero. `dbgExit`
is similar but exits immediately, avoiding further output. The
`dbgshow`, `dbgppshow` and `dbgpprint` variants allow control over the
pretty-printing method and required debug level, allowing more control
over what is displayed when.

Other cleanups: lstrace -> ltrace, pdbgAt -> pdbg, tracewith -> traceWith.
2013-12-06 13:35:50 -08:00
Simon Michael
22a8020296 make most types instances of Data (and Typeable)
This allows them to be pretty-printed with pprint (from data-pprint)
when debugging, and shouldn't have much impact otherwise.
2013-12-06 13:19:43 -08:00
Simon Michael
2de58e2ec0 fix haddock errors in Reports.hs 2013-09-28 10:14:43 -07:00
Simon Michael
7e06a6a24c balance: basic multi-column balance (change) reports 2013-09-26 15:06:48 -07:00
Simon Michael
d6c841d93b show search queries more accurately in --debug output 2013-09-23 11:50:20 -07:00
Simon Michael
671bb6c4a2 require data-pprint as a debugging aid and make some types compatible with it 2013-09-21 13:36:43 -07:00
Simon Michael
8444be6f88 docs: report haddock cleanups 2013-09-10 13:42:57 -07:00
Simon Michael
f9656a21af print: comment positions (same line or next line) are now preserved 2013-09-10 10:32:49 -07:00
Simon Michael
7ed0705398 register: --average/-A shows a running average, like ledger 2013-09-09 18:25:53 -07:00
Simon Michael
3d205ec03f refactor: rename unclear helper 2013-09-09 17:41:29 -07:00
Simon Michael
060d1fdd1b change comm: to sym: and require a match on the whole symbol 2013-09-09 15:26:45 -07:00
Simon Michael
957f57a07b new comm:REGEXP query matches commodity symbols. Also some minor amt: fixes. 2013-09-09 15:04:43 -07:00
Simon Michael
73230838c5 parsing: amt queries use the = operator by default 2013-09-09 11:57:25 -07:00
Simon Michael
eff1d3f1a5 csv reader: add the include directive, useful for factoring out common rules used with multiple CSV files 2013-08-03 20:53:41 -07:00
Dmitry Astapov
ed58d815d6 Fix for multiple field assignments in CSV parsing 2013-06-19 08:30:33 +01:00
Simon Michael
080eb866ec web: clean up language extensions a bit, make autoweb works again 2013-06-04 18:23:55 -07:00
Simon Michael
e13ea5706d oops, missed a build failure 2013-06-04 11:43:26 -07:00
Simon Michael
fd8de9558e web: show proper Y-values in register chart (fixes #122) 2013-06-03 23:15:30 -07:00
Simon Michael
2e5718d5ea web: show one line per commodity in charts. Needs more polish, but fixes #109. 2013-06-01 15:33:33 -07:00
Simon Michael
95f909543a fix a haddock failure reported by hydra 2013-06-01 13:55:34 -07:00
Simon Michael
c2fa4b3c21 parsing: make balance assertions more robust with different precisions (#119)
Also note another issue.
2013-06-01 13:39:00 -07:00
Simon Michael
44545d6ec7 parsing: update a csv reader error message 2013-06-01 12:38:58 -07:00
Simon Michael
a26ab926d8 parsing: don't fail when a csv amount has trailing whitespace (fixes #113) 2013-06-01 12:38:13 -07:00
Simon Michael
56a37aabcf small cleanup 2013-05-30 15:17:21 -07:00
Simon Michael
6073b56b9e parsing: order postings first by date, then by parse order when checking balance assertions 2013-05-30 15:16:54 -07:00
Simon Michael
5685b3dc9c parsing: don't allow = in unquoted commodity symbols, fixes commodity-less balance assertion amounts 2013-05-30 15:15:38 -07:00
Simon Michael
87820705f5 parsing: after reading a journal file, check all balance assertions and continue only if they pass 2013-05-28 16:25:00 -07:00
Simon Michael
0be986fcb9 parsing: actually parse balance assertions
Parser unit test is commented out until HTF tests are fixed.
2013-05-28 16:22:30 -07:00
Simon Michael
e89bd131e9 also fix warnings in UTF8IOCompat 2013-04-12 16:28:29 -07:00
Simon Michael
42385fc8bf parsing: read dos line endings, deprecate encoding compatibility layer
We should now read all text in universal newline mode, so eg journal
files with DOS/windows line endings are fine.

This also deprecates and disables our IO encoding compatibility layer,
which prevented many encoding-related problems with certain platforms
and GHC versions. With modern GHC (7.x) this is now hopefully totally
unnecessary, but the module remains in place just in case.
2013-04-12 16:18:20 -07:00
Simon Michael
78837c66a6 parsing: fix test breakage due to new csv rules format (fixes #102) 2013-04-12 14:59:28 -07:00
Simon Michael
616a25979a CSV reader version 2 with new rules syntax
At long last. The main change is a new rules file format that aims to
be more powerful and more intuitive than v1 (hledger 0.19.x and older).
Existing rules files will need to be adapted manually to the new format.
2013-03-29 22:56:55 +00:00
Simon Michael
af5c0e80e0 parsing: read files in universal newline mode
Line endings other than the unix style, are now accepted in journal and rules files.
2013-03-29 18:46:10 +00:00
Simon Michael
7b6a59123d eolof parser matches end of line or end of file 2013-03-29 18:42:00 +00:00
Simon Michael
972106b145 update ptrace, add dbg, ppShow utilities 2013-03-29 18:40:10 +00:00
Simon Michael
3b5c0bc4a1 provide some regex-posix-based utilities that perform better than regexpr 2013-03-29 18:39:57 +00:00
Simon Michael
b780badd07 provide "when" 2013-03-29 18:38:43 +00:00
Simon Michael
70b171e018 querying by code: 2013-03-22 17:59:16 +00:00
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
Simon Michael
d4a897306c combine command-line flags like --depth properly with non-flag query patterns 2012-06-29 22:36:30 +00:00
Simon Michael
5e944374de web: don't auto-create a missing journal file at startup 2012-06-29 22:48:41 +00:00
Simon Michael
a6d93a164d enable csv as a native data format (not yet obeying --rules-file) 2012-03-23 17:14:24 +00:00
Simon Michael
977fb2c3e8 make the utf8 IO compatibiity layer build on GHC 6.12.3, 7.0.4, 7.2.2, 7.4.1 2012-03-29 20:40:31 +00:00
Simon Michael
50068221c3 fix build warnings in all GHC versions 2012-03-29 21:19:35 +00:00
Simon Michael
18f8a5386a docs: fix UTF8IOCompat haddock 2012-03-29 22:10:43 +00:00
Simon Michael
9ed8d8a8f6 docs: fix haddock hyperlink 2012-03-30 19:24:20 +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
b77ba66fb1 haddock fix 2012-05-15 01:51:14 +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
9524e6d927 more metadata -> tag renaming in the parser 2012-05-28 00:24:49 +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