From 991e3a3eaf2c31f856faa85cfed514bbb28be526 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 24 Jun 2009 16:43:46 +0100 Subject: Split commodity.h/cc into three files commodity.h - code for commodity_t annotate.h - commodity annotations pool.h - commodity pool management --- src/xact.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/xact.cc') 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() == -- cgit v1.2.3