diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-30 00:38:29 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-30 00:51:05 -0500 |
commit | 8e8c2904f55eb9a43b3eb8057e9f11767a624dff (patch) | |
tree | bd7473e6ca867ab8a2fe10cc657484810e8daac7 /src/amount.cc | |
parent | 4b2b9dc009e5f44029cc23ea17e0a5c98266baff (diff) | |
download | fork-ledger-8e8c2904f55eb9a43b3eb8057e9f11767a624dff.tar.gz fork-ledger-8e8c2904f55eb9a43b3eb8057e9f11767a624dff.tar.bz2 fork-ledger-8e8c2904f55eb9a43b3eb8057e9f11767a624dff.zip |
Never price commodities using annotated commodities
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amount.cc b/src/amount.cc index 2f7b434e..50496f2d 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -757,10 +757,10 @@ amount_t::value(const datetime_t& moment, } } - if (! point) { - if (comm && commodity().referent() == comm->referent()) - return *this; + if (comm && commodity().referent() == comm->referent()) + return with_commodity(comm->referent()); + if (! point) { point = commodity().find_price(comm, moment); // Whether a price was found or not, check whether we should attempt |