diff options
Diffstat (limited to 'src/draft.cc')
-rw-r--r-- | src/draft.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/draft.cc b/src/draft.cc index 8478a31d..fc53e956 100644 --- a/src/draft.cc +++ b/src/draft.cc @@ -458,6 +458,9 @@ xact_t * draft_t::insert(journal_t& journal) *post.cost *= new_post->amount; post.cost->set_commodity(cost_commodity); } + else if (new_post->amount.sign() < 0) { + new_post->cost->in_place_negate(); + } new_post->cost = *post.cost; DEBUG("derive.xact", "Copied over posting cost"); |