summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-24 16:43:46 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-24 16:43:46 +0100
commit991e3a3eaf2c31f856faa85cfed514bbb28be526 (patch)
tree56bfc7e97de0b0b7855a2dea180f43f6c828d16a /src/xact.cc
parent77d69d0e240287a104223a2c32b10d70ed58ca7b (diff)
downloadfork-ledger-991e3a3eaf2c31f856faa85cfed514bbb28be526.tar.gz
fork-ledger-991e3a3eaf2c31f856faa85cfed514bbb28be526.tar.bz2
fork-ledger-991e3a3eaf2c31f856faa85cfed514bbb28be526.zip
Split commodity.h/cc into three files
commodity.h - code for commodity_t annotate.h - commodity annotations pool.h - commodity pool management
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xact.cc b/src/xact.cc
index 5c95b781..bd8a5955 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -35,6 +35,7 @@
#include "post.h"
#include "account.h"
#include "journal.h"
+#include "pool.h"
namespace ledger {
@@ -269,9 +270,9 @@ bool xact_base_t::finalize()
throw_(balance_error,
_("A posting's cost must be of a different commodity than its amount"));
- commodity_t::cost_breakdown_t breakdown =
- commodity_t::exchange(post->amount, *post->cost, false,
- datetime_t(date(), time_duration(0, 0, 0, 0)));
+ cost_breakdown_t breakdown =
+ amount_t::current_pool->exchange(post->amount, *post->cost, false,
+ datetime_t(date(), time_duration(0, 0, 0, 0)));
if (post->amount.is_annotated() &&
breakdown.basis_cost.commodity() ==