Commit Graph

79 Commits

Author SHA1 Message Date
Simon Michael
06eb2a9aa8 --effective option uses transactions' effective dates, if any 2009-07-08 23:37:44 +00:00
Simon Michael
d1418a2a21 show better errors for unbalanced transaction and missing default year 2009-06-05 19:35:12 +00:00
Simon Michael
3be793f108 fix nafai's bug: fail on empty account name components, don't just ignore 2009-06-05 18:02:22 +00:00
Simon Michael
cb8ea69dfc fix warnings all over - hledger is now -W-clean 2009-06-05 09:44:20 +00:00
Simon Michael
568e752484 allow parentheses and brackets inside account names, as ledger does 2009-05-25 17:28:41 +00:00
Simon Michael
1572622ae6 use a consistent prefix for Transaction field accessors 2009-04-04 21:26:55 +00:00
Simon Michael
a78f5a1f04 model timelog entry codes precisely 2009-04-03 20:04:51 +00:00
Simon Michael
2c989522da add missing type signatures, for tags 2009-04-07 21:38:38 +00:00
Simon Michael
cfaacd26b6 parse error fixes 2009-04-10 04:38:46 +00:00
Simon Michael
1085d476f1 parse zero-length input as an empty ledger 2009-04-10 05:42:26 +00:00
Simon Michael
69ce8b9a8e don't treat comments as part of ledger transaction descriptions 2009-04-10 05:37:26 +00:00
Simon Michael
eb3ec063d0 require a non-empty description in ledger transactions 2009-04-10 04:39:54 +00:00
Simon Michael
5d1f535b5e require some postings in ledger transactions 2009-04-10 05:00:51 +00:00
Simon Michael
638238dc5c ledgerFile cleanup 2009-04-10 05:40:57 +00:00
Simon Michael
1fd416ba96 whitespace 2009-04-16 06:34:32 +00:00
Sergey Astanin
86fab58e6a Allow UTF8 in ledgers (account names, descriptions).
This patch fixes broken layout of some commands when there is Unicode
text in the ledger file.

I substituted System.IO functions with System.IO.UTF8. Now all strings
are Unicode internally, and take's and length's work correctly.
In particular, add, balance, hist, print and register commands seem
to work correctly; ui is still broken for me, I didn't try web.

I decode command line arguments from UTF8 forcefully, to permit
searches for accounts and descriptions with Unicode (otherwise, it
does not work).

The patch adds an additional dependency: utf8-string.

This patch does not include new test cases.
2009-05-14 20:44:06 +00:00
Simon Michael
32a3af8334 transactionamount -> postingamount 2009-04-07 21:18:51 +00:00
Simon Michael
d8fe2aabb2 drop TimeLog, it's no longer needed 2009-04-03 11:05:16 +00:00
Simon Michael
0f1cbef9a8 namegeddon! conform to new terminology in ledger 3, more or less
This renames RawTransaction -> Posting and Entry -> LedgerTransaction,
plus a bunch more cleanups for consistency.  So while ledger 3 has
transactions containing postings, and so do we when speaking to users,
internally we call ledger 3's transactions LedgerTransaction, and we keep
our old Transaction type as well, because it's useful and used all over
the place. To review:

- ledger 2 had Entrys containing Transactions.

- hledger 0.4 had Entrys containing RawTransactions, and Transactions
  which are a RawTransaction with its parent Entry's info added.
  Transactions are what we most work with when reporting and are
  ubiquitous in the code and docs.

- ledger 3 has Transactions containing Postings.

- hledger 0.5 now has LedgerTransactions containing Postings, with
  Transactions kept as before (a Posting plus it's parent's info).  These
  could be named PartialTransactions or TransactionPostings, but it gets
  too verbose and obscure for devs and users.
2009-04-03 10:58:05 +00:00
Simon Michael
1fc9db3af5 individual transactions now have a cleared status 2009-01-23 00:14:12 +00:00
Simon Michael
89abdfa456 refactor/fix balanced entry checking and test it properly 2009-04-01 08:55:46 +00:00
Simon Michael
ae5a9439d0 count time elapsed in open timelog entries, ignore time zone
Any open sessions in a timelog will be considered clocked out as of the
current time, and included in calculations. Also, contrary to the earlier
patch we now ignore timezone everywhere and deal only with local times.
This might need revisiting eg to track time while crossing timezones.
2009-01-25 07:06:59 +00:00
tim
fd8587fbdf Handle !includes relative to the including file 2009-02-04 21:27:20 +00:00
Simon Michael
25526cf4b3 parse timelog entries according to a timezone stored in the context 2009-01-24 21:46:09 +00:00
Simon Michael
b218647631 a little cleanup, haddock parsing context 2009-01-24 21:15:38 +00:00
Simon Michael
f8905464ac implement default year, allowing m/d dates in ledger 2009-01-27 21:55:26 +00:00
Simon Michael
16e33b50e6 parse Y default year lines in a ledger, so they don't break it (ignoring them) 2009-01-22 23:42:34 +00:00
nick
4ea30b7411 Fixed ;-only bug 2008-12-08 07:20:29 +00:00
nick
68682fa0ee Tilde expansion in !include 2008-12-10 17:40:05 +00:00
nick
600582184c Support for !account directives, and tests 2008-12-08 07:21:33 +00:00
nick
9b7a3689f5 !account affects timelog entries 2008-12-10 17:40:36 +00:00
tim
4bc97d237a Added support for reading historical prices from files 2008-12-16 10:54:20 +00:00
nick
0be862f760 Fixed TimeLog handling and certain blank lines 2008-12-08 03:45:35 +00:00
nick
ee4a2a1c1e New ledger parser with file inclusion 2008-12-08 01:49:31 +00:00
Simon Michael
630e22312b remove DateTime and Date types, use Day and UTCTime directly
This seems simplest for now, I might bring type synonyms back later.
2008-11-27 04:01:07 +00:00
Simon Michael
884ebf2979 gather date stuff together, FuzzyDate -> SmartDate 2008-11-27 00:35:00 +00:00
Simon Michael
e8a0d42906 cleanup 2008-11-26 22:15:22 +00:00
Simon Michael
8c56c3c4b3 refactoring date parsing, FuzzyDate 2008-11-26 23:21:24 +00:00
Simon Michael
49a84957a9 cleanup smartdate 2008-11-26 21:34:26 +00:00
Simon Michael
3e1a615dbf misc cleanup 2008-11-26 05:21:44 +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
b3c0bba51e haddock fix 2008-11-24 00:14:11 +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
64c6082c23 parse comment lines beginning with a space, as from M-; in emacs ledger-mode 2008-10-18 10:54:22 +00:00
Simon Michael
a49b9715ef allow extra whitespace and comments at end of ledger 2008-11-22 07:00:52 +00:00
Simon Michael
7362fbd730 begin smart date parsing 2008-11-22 12:18:19 +00:00