Commit graph

146 commits

Author SHA1 Message Date
Alexis Hildebrandt
1dd9dcaab4 Bump copyright notice to 2015
The following script makes it a no-brainer:
% NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \
  | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
2014-12-27 11:24:55 +01:00
Joseph Mornin
4c86042665 "mispelled" was misspelled 2014-09-08 09:41:21 -07:00
Martin Michlmayr
37b8b5e337 Preserve original cost basis when gain or loss is made
Change the definition of cost: in the past, if you bought 1 AAA for
$10 and then sold it for $12, ledger would take $12 as the cost.  With
the patch, the original cost of $10 is preserved ss the cost basis.
In my opinion, this brings ledger in line with accounting expectations.

This change fixes bugs #712 and #713.

Bug #712 is about Equity:Capital Gains and Equity:Capital Loss
entries ledger automatically generates that are in my opinion
incorrect.

Bug #713 is about strange behaviour with -B after a capital gain or
loss is made.

Patch from John Wiegley.
2014-07-14 20:39:04 -04:00
John Wiegley
bd8a1a6756 Use the POST_COST_VIRTUAL flag when exchange commodities
Fixes #999
2014-05-08 14:28:07 -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
Alexis Hildebrandt
2b9208e850 Bump copyright information to 2014 2014-02-02 12:36:22 +01:00
John Wiegley
82345899f7 Remove some unnecessary and complicated logic
Fixes #712
2013-05-19 03:38:20 -05:00
Johann Klähn
a875940a93 fix ledger xml output, remove ledger json command
As the format used by property trees to represent valid JSON
and that for valid XML is too different and given that there are
more requests for valid XML output I decided to pursue a quick fix
and remove the json command in favor of a working xml command.

See bug #782, #909, recent discussion on mailing list.

JSON support is postponed until I or someone else finds time to work on
this or the python bindings are more stable.
2013-03-08 22:56:01 +01: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
63712728e1 Properly handle metadata tags on auto-postings 2012-11-12 02:30:04 -06:00
John Wiegley
29359f3a87 Account names in auto-xacts can be format strings 2012-11-12 02:30:04 -06:00
Craig Earls
14dcb27777 Implemented Bug551 Automatic Transactions are cleared base on parent 2012-10-23 13:07:39 -07:00
John Wiegley
8869566331 Fixed a subtle memory overwrite
Fixes #608
2012-06-27 16:55:46 -05:00
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
a38ed141c1 Switched to Boost.PropertyTree for XML generation 2012-05-18 01:31:01 -06:00
John Wiegley
f4f3058b8c Switch to using Boost.Format 2012-05-14 21:44:00 -06:00
John Wiegley
ee641f353c Resolve some issues with proof builds 2012-04-15 01:17:01 -05:00
John Wiegley
1e572d508d Add 'data' member to account/journal objects 2012-04-13 15:16:27 -05:00
John Wiegley
cee47cc495 Simplified some code in xact.cc 2012-03-23 16:59:06 -05:00
John Wiegley
2605d8a711 Improved error reporting for bad account names
Fixes #374
2012-03-16 04:29:35 -05:00
John Wiegley
c9f7195936 Added the notion of "virtual costs" 2012-03-09 01:28:20 -06:00
John Wiegley
7bb83173da Added some missing DEBUG #if's 2012-03-07 08:34:15 -06:00
John Wiegley
1e18536a8c Deferred notes were being processed too late 2012-03-07 05:37:49 -06:00
John Wiegley
76f97a63da Added parsing support for the many value directives 2012-03-07 05:20:42 -06:00
John Wiegley
69b25d367e Call register_account for posts created by auto xacts 2012-03-07 05:19:46 -06:00
John Wiegley
71d0033b6f Corrected several compile and link problems 2012-03-06 23:04:27 -06:00
John Wiegley
ff9cf572fe Added (disabled) code to stop sorting generated balancing postings 2012-03-05 17:49:11 -06:00
John Wiegley
46b124a649 Added some DEBUG statements 2012-03-05 17:47:44 -06:00
John Wiegley
121d878a0c When deleting a post from an xact, remove it from its account 2012-03-05 15:42:45 -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
656e46e182 Renamed actual/effective dates to primary/auxiliary 2012-02-28 03:02:16 -06:00
John Wiegley
196816d5aa Added a TODO comment 2012-02-27 12:38:14 -06:00
John Wiegley
3ed09fc85b Optimizations 2012-02-27 11:52:27 -06:00
John Wiegley
2ec35ea6e9 Implement the "tag" metadata directive 2012-02-27 05:02:25 -06:00
John Wiegley
ee530f9433 Fixed the scoping of auto xact predicates 2012-02-27 04:08:39 -06:00
John Wiegley
9449ca2c80 Whitespace fix 2012-02-27 03:55:02 -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
8887fe9fa9 Removed unneeded break statements 2012-02-17 15:09:32 -06:00
John Wiegley
f0791bbd72 Cleanup whitespace 2011-08-18 14:48:38 -04:00
John Wiegley
af94c94a6f Corrected a transient display order flaw
This was harmless, but affected the testability of results.
2011-03-28 01:53:15 -04:00
John Wiegley
266dee564f Price annotation no longer inject an implied cost
Consider the following transaction:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL {$30}
      Assets:Brokerage

Previously, this would have been equivalent to:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL @ $30
      Assets:Brokerage

However, this is not always what the user expects to happen.  When @ is
not being used, the transaction should reflect a mere transfer of
commodities.  This is now how it works, and thus the above transaction
is now equivalent to the following instead:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL {$30}
      Assets:Brokerage      -10 AAPL {$30}
2010-06-22 20:56:35 -04:00
John Wiegley
1f3dba7756 Don't do cost finalization for auto/period xacts 2010-06-22 20:53:05 -04:00
John Wiegley
d792cc0ffc Corrected a major flaw in the transaction finalizer
When a transaction has two commodities, but also a null posting, no
attempt should be made to resolve the costs in terms of the primary
commodity.
2010-06-21 17:44:19 -04:00
John Wiegley
6420390d36 If a posting's price has an annotation tag, save it 2010-06-20 18:50:44 -04:00
John Wiegley
968a6f3c0a Changes for building with Visual Studio 2008 2010-06-15 05:14:00 -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
e3f228bd5b Fixed several misplaced parentheses 2010-06-13 19:56:10 -04:00
John Wiegley
2ea075dc4f Report error context in expressions more precisely 2010-06-13 18:39:26 -04:00