diff options
Diffstat (limited to 'src/pool.cc')
-rw-r--r-- | src/pool.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pool.cc b/src/pool.cc index 2627c816..95c0f49d 100644 --- a/src/pool.cc +++ b/src/pool.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2013, John Wiegley. All rights reserved. + * Copyright (c) 2003-2015, John Wiegley. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -267,7 +267,8 @@ commodity_pool_t::exchange(const amount_t& amount, // Do not record commodity exchanges where amount's commodity has a // fixated price, since this does not establish a market value for the // base commodity. - if (! per_unit_cost.is_realzero() && + if (add_price && + ! per_unit_cost.is_realzero() && (current_annotation == NULL || ! (current_annotation->price && current_annotation->has_flags(ANNOTATION_PRICE_FIXATED))) && |