Commit graph

59 commits

Author SHA1 Message Date
John Wiegley
0d23e3d4f6 Apply any outstanding deferred postings at the end of parsing 2014-04-14 11:08:26 -05:00
John Wiegley
8f8a94c28e Add the concept of "deferred postings"
This is pretty much exclusively for allowing one to use balance
assertions with replicated transactions across multiple files.
2014-04-13 23:26:14 -05:00
John Wiegley
634aa589cd The option --permissive now quiets balance assertions 2014-04-13 23:26:14 -05:00
Peter Feigl
ecd5097d51 Adding option --no-aliases to completely disable alias expansion 2014-02-26 23:50:50 +01:00
Peter Feigl
75b0a5d8ff Adding option --recursive-aliases, adding documentation to man-page and manual 2014-02-26 09:29:31 +01:00
Peter Feigl
2dabb914c0 fixing problem with previous commit if no aliases are registered 2014-02-26 01:16:03 +01:00
Peter Feigl
c80b495546 Adding support for recursive aliases.
Alias expansion is now a loop. If you define

alias A=B:A
alias B=C:B

then A will expand to C:B:A.

Also added a short section to the manual about this.
2014-02-25 22:50:20 +01:00
Alexis Hildebrandt
2b9208e850 Bump copyright information to 2014 2014-02-02 12:36:22 +01:00
John Wiegley
d30c3fb869 Guard against a possible null value 2013-09-20 00:54:43 -05:00
John Wiegley
db35e5c8fc Resolve new compiler warnings from Clang 2013-05-19 02:14:27 -05:00
John Wiegley
0951bcebef Bump copyright information to 2013 2013-02-18 06:51:21 -06:00
Johann Klähn
3ed53b7b3c whitespace cleanup 2013-01-16 23:11:45 +01:00
John Wiegley
aba0a5ed2d Improvement to account alias expansion
Aliases are now expanded not only if they occur by themselves, but also
if they occur as the beginning of a multi-part account.  Given <alias
Food=Expenses:Food> the account <Food:Tomatos> should now be expanded to
<Expenses:Food:Tomatos>.
2013-01-11 07:08:51 -06:00
John Wiegley
f4f3058b8c Switch to using Boost.Format 2012-05-14 21:44:00 -06:00
John Wiegley
22505d9527 Always call TRACE_CTOR at the end of constructors 2012-03-20 02:10:40 -05:00
John Wiegley
22c1b867f0 Added option --day-break 2012-03-17 05:27:43 -05:00
John Wiegley
76f97a63da Added parsing support for the many value directives 2012-03-07 05:20:42 -06:00
John Wiegley
023033f182 Added a few comments 2012-03-07 00:33:24 -06:00
John Wiegley
944e580825 Refactored the notion of "the current parsing context" 2012-03-01 03:31:28 -06:00
John Wiegley
e2afc783db Increased file copyrights to 2012 2012-02-29 22:32:23 -06:00
John Wiegley
d51d33d788 Added some missing variable names 2012-02-27 12:38:23 -06:00
John Wiegley
3ed09fc85b Optimizations 2012-02-27 11:52:27 -06:00
John Wiegley
5532a1a8b7 Added --check-payees option 2012-02-27 11:52:23 -06:00
John Wiegley
2ec35ea6e9 Implement the "tag" metadata directive 2012-02-27 05:02:25 -06:00
John Wiegley
3d8cad77c4 Enable payee mappings 2012-02-27 03:56:16 -06:00
John Wiegley
4b58047ecb Move when Unknown accounts are processed 2012-02-27 03:56:07 -06:00
John Wiegley
61bc7362ca Added new account/payee/commodity directives
Also added supporting options: --explicit, --permissive, --pedantic, as
well as new behavior for --strict.
2012-02-27 02:31:09 -06:00
John Wiegley
0efdc0cf6f The "id" of an item now maps to its UUID 2012-02-27 02:31:08 -06:00
John Wiegley
7553df5600 Corrected an error message 2012-02-26 15:52:19 -06:00
John Wiegley
aa9b07d79b Added --rich-data for 'convert', and SHA1 checksum checking 2012-02-26 15:45:15 -06:00
John Wiegley
72527ce3b3 Fixes for variable shadowing (18/28) 2012-02-17 15:06:18 -06:00
John Wiegley
f0791bbd72 Cleanup whitespace 2011-08-18 14:48:38 -04:00
John Wiegley
dcffd218a1 Revised how Ledger handles the "current year"
Now when the Y directive sets the current year for a region, it affects
everything, as if the clock really were set back to that year.
2010-06-14 03:23:09 -04:00
John Wiegley
8d2fce1ae8 Automated xacts may now contain "deferred tags"
For example, consider the following automated transaction:

  = /Food/
    ; Next Date:: date + 10
    (Expenses:Tax)                1.00
    ; Next Date:: date + 20

This will add a metadata field named 'Next Date' to the _matching
posting_, with a value that is 10 days later than that posting.  It will
also generate a new posting for that transaction, whose amount is the
same as the matching posting.  Further, it will add a 'Next Date'
metadata tag to the _generated posting_ whose value is 20 days later
than the date of the matching posting.
2010-06-13 01:03:48 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
ab416f759f Updated copyrights to 2003-2010 2010-03-05 22:14:10 -05:00
John Wiegley
40eae8bf94 Reformatted a comment 2010-02-05 00:00:40 -05:00
John Wiegley
4e30fcdf40 Many improvements to Ledger's Python bindings 2009-11-19 22:24:24 -05:00
John Wiegley
48dc654eda Added has_xdata() methods for journal_t and xact_t 2009-11-12 05:11:06 -05:00
John Wiegley
c22b8457ef Did away with the "finalizer" abstraction
This was from an earlier time, when it was intended to be used by
Python.  But it's not needed anymore.
2009-11-11 18:29:21 -05:00
John Wiegley
e8ea2d4938 Automated postings defer amount expression calculation
This allows for value expressions to be used which reference the
incoming posting, for example:

  = Income:Clients:
    (Liabilities:Taxes:VAT1)  (floor(amount) * 1)
    (Liabilities:Taxes:VAT2)  0.19

  2009/07/27 * Invoice
    Assets:Bank:Checking                           $1,190.45
    Income:Clients:ACME_Inc

The automated posting for VAT1 will use the floored amount multiplied by
a factor, while the posting for VAT2 multiples the whole amount as
before.
2009-11-11 04:22:37 -05:00
John Wiegley
06f4c27867 Renamed journal_t::basket to bucket 2009-11-07 06:39:50 -05:00
John Wiegley
05d0f1a17f The binary cache is working again 2009-11-06 02:07:56 -05:00
John Wiegley
34ee358f5e Moved journal reading code into journal_t 2009-11-05 02:27:42 -05:00
John Wiegley
3dc200983d Moved xdata clearing code into each type proper 2009-11-05 02:27:39 -05:00
John Wiegley
bdb3ebca3f Initialize journal_t::basket to NULL 2009-11-03 15:33:52 -05:00
John Wiegley
2149a8e773 Create a --cache option, for using a binary cache 2009-10-31 00:09:57 -04:00
John Wiegley
63aa8992a8 Moved ownership of master account into journal_t
The journal_t now completely represents the data part of a session.
2009-10-30 19:03:28 -04:00
John Wiegley
110f0b8023 Enabled use of pre-compiled headers by default 2009-03-10 17:02:03 -04:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00