summaryrefslogtreecommitdiff
path: root/src/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-21 07:56:23 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-21 07:56:23 -0400
commit79a8fc5a8748ade2e15892e2eb8e199ec0939fb4 (patch)
tree66ef74f24c8eb7d3cfebc84c83918b1b6ca58da4 /src/amount.cc
parent697f6a6bce46e75fcb37c38da9f16ca2f1a8e9a3 (diff)
downloadfork-ledger-79a8fc5a8748ade2e15892e2eb8e199ec0939fb4.tar.gz
fork-ledger-79a8fc5a8748ade2e15892e2eb8e199ec0939fb4.tar.bz2
fork-ledger-79a8fc5a8748ade2e15892e2eb8e199ec0939fb4.zip
Created several alternate 'value' methods to support the upcoming commodity
valuation changes.
Diffstat (limited to 'src/amount.cc')
-rw-r--r--src/amount.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 8d433ad4..59671f98 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -650,7 +650,8 @@ amount_t& amount_t::in_place_unreduce()
optional<amount_t> amount_t::value(const optional<datetime_t>& moment) const
{
if (quantity) {
- optional<amount_t> amt(commodity().value(moment));
+ // jww (2008-09-21): 'none' is not the right argument here.
+ optional<amount_t> amt(commodity().value(none, moment));
if (amt)
return (*amt * number()).round();
} else {