From bd8a1a67560f1ff8c443351b55b4731f1be04126 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 8 May 2014 19:22:17 +0000 Subject: Use the POST_COST_VIRTUAL flag when exchange commodities Fixes #999 --- src/xact.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/xact.cc') diff --git a/src/xact.cc b/src/xact.cc index c7a9c6e3..eec4cff3 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -292,9 +292,9 @@ bool xact_base_t::finalize() _("A posting's cost must be of a different commodity than its amount")); cost_breakdown_t breakdown = - commodity_pool_t::current_pool->exchange - (post->amount, *post->cost, false, ! post->has_flags(POST_COST_VIRTUAL), - datetime_t(date(), time_duration(0, 0, 0, 0))); + commodity_pool_t::current_pool->exchange( + post->amount, *post->cost, false, ! post->has_flags(POST_COST_VIRTUAL), + datetime_t(date(), time_duration(0, 0, 0, 0))); if (post->amount.has_annotation() && post->amount.annotation().price) { if (breakdown.basis_cost.commodity() == breakdown.final_cost.commodity()) { -- cgit v1.2.3