Commit Graph

56 Commits

Author SHA1 Message Date
Simon Michael
23e3c81acc cleanups 2009-12-19 06:26:33 +00:00
Simon Michael
60bda57a26 drop LedgerPosting, it's no longer needed; more rename cleanups 2009-12-19 05:57:54 +00:00
Simon Michael
42e5382673 docs: haddock 2009-12-19 01:56:12 +00:00
Simon Michael
dbfc9f3624 docs: fix haddock 2009-12-16 17:59:06 +00:00
Simon Michael
59c199e1a8 docs: wording 2009-12-19 03:09:55 +00:00
Simon Michael
ec95b0723c make Postings reference their parent Transaction
With this change, Transactions and Postings reference each other
co-recursively.  This makes constructing them more tedious, but it
may also allow LedgerPostings to be dropped and code to be simplified.
Time and space performance of register and balance is as before.
2009-12-19 03:44:52 +00:00
Simon Michael
f1813fbb0e more LedgerTransaction/Transaction/LedgerPosting field renames 2009-12-16 17:58:51 +00:00
Simon Michael
30b83bb105 rename LedgerTransaction to Transaction 2009-12-16 08:07:26 +00:00
Simon Michael
0656d575ac rename Transaction to LedgerPosting 2009-12-16 07:58:06 +00:00
Simon Michael
2e9b27da0d rename RawLedger to Journal 2009-12-16 07:00:43 +00:00
Simon Michael
92c87f088a docs: updates 2009-11-25 17:44:51 +00:00
Simon Michael
48f6e03325 docs: haddock fixes 2009-11-25 12:57:30 +00:00
Simon Michael
2cdc21959e web: switch to hack/loli/hsp, allow web data entry, detect file changes 2009-08-12 09:38:48 +00:00
Simon Michael
9560073b2a make historical prices more robust, fix a runtime Map.find error 2009-12-09 20:51:00 +00:00
Simon Michael
cafa59ac3d price history support, first cut
P directives now work, but differently from current c++ ledger for now.
Each posting amount is assigned a fixed unit price from the price history
when available (unless overridden by @). This is simple and useful for
fixed-rate transactions such as foreign currency expenses.
2009-11-25 12:15:53 +00:00
Simon Michael
a17346149c a ledger remembers when it was read from disk 2009-08-12 09:21:46 +00:00
Simon Michael
6fb1804cfd refactor IOArgs -> FilterSpec and make haddock happy 2009-07-09 20:25:50 +00:00
Simon Michael
a8bfb06da4 refactor effective date support, fix warnings 2009-07-09 19:22:27 +00:00
Simon Michael
06eb2a9aa8 --effective option uses transactions' effective dates, if any 2009-07-08 23:37:44 +00:00
Simon Michael
1572622ae6 use a consistent prefix for Transaction field accessors 2009-04-04 21:26:55 +00:00
Simon Michael
ca16e98655 haddock 2009-04-04 23:15:42 +00:00
Simon Michael
1ef777a1b8 improve type docs 2009-04-03 20:55:49 +00:00
Simon Michael
a78f5a1f04 model timelog entry codes precisely 2009-04-03 20:04:51 +00:00
Simon Michael
d8fe2aabb2 drop TimeLog, it's no longer needed 2009-04-03 11:05:16 +00:00
Simon Michael
1548e84aa9 add file path field to RawLedger 2009-04-08 03:40:05 +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
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
4bc97d237a Added support for reading historical prices from files 2008-12-16 10:54:20 +00:00
nick
5e0313e447 Added timelog entries to ledger and added useful utilities 2008-12-08 01:48:03 +00:00
Simon Michael
a51596899f a cached ledger now includes the full ledger text, also.
This reads the file twice, since I couldn't figure out how to do it just
once with the new error monad.. fixes welcome.
2008-12-10 07:29:08 +00:00
Simon Michael
41a3fb91d5 support reporting intervals in period expressions and register report, and -W/-M/-D 2008-12-03 23:20:38 +00:00
Simon Michael
dd93418784 handle "from ... to ..." period expressions 2008-11-27 19:42:03 +00:00
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
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
4c97ca5514 smarter handling of priced amounts. Normalising and some basic arithmetic now preserve prices.
Currently, amounts with the same commodity but different prices are kept separate. Useful ?
2008-11-22 20:30:43 +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
33f06f334e first attempt at storing per-amount price 2008-11-22 16:26:01 +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
2d41368b8b introduce MixedAmount 2008-10-17 00:57:10 +00:00
Simon Michael
648887b36f use MixedAmount everywhere. seems to work. 2008-10-18 08:39:08 +00:00
Simon Michael
c444b02349 a first cut at mixed amounts. Accounts have a MixedAmount balance, displayed on one line 2008-10-17 03:14:23 +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
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
01cd388c24 remove dead code, simplify cacheLedger again 2008-10-12 07:46:54 +00:00
Simon Michael
2cef939da1 rename accounts/filteraccounts fields to accountmap/filteraccountmap 2008-10-10 22:28:10 +00:00