diff options
author | John Wiegley <johnw@newartisans.com> | 2006-02-28 00:53:47 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:27 -0400 |
commit | a597b0fb5e00220085ab5d5e1421fd9e41d9080e (patch) | |
tree | e9a732374b1eaf90358f7ad7c051cc58880ff3a2 /value.h | |
parent | 7901598f1d1e419e19c860e81749805371298030 (diff) | |
download | fork-ledger-a597b0fb5e00220085ab5d5e1421fd9e41d9080e.tar.gz fork-ledger-a597b0fb5e00220085ab5d5e1421fd9e41d9080e.tar.bz2 fork-ledger-a597b0fb5e00220085ab5d5e1421fd9e41d9080e.zip |
Further improvements to lot pricing.
Diffstat (limited to 'value.h')
-rw-r--r-- | value.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -145,7 +145,7 @@ class value_t } value_t& operator=(const balance_pair_t& value) { if ((balance_pair_t *) data != &value) { - if (! value.cost) { + if (! value.price && ! value.cost) { return *this = value.quantity; } else { destroy(); @@ -266,8 +266,10 @@ class value_t void abs(); void cast(type_t cast_type); value_t cost() const; - value_t factor_price() const; - value_t& add(const amount_t& amount, const amount_t * cost = NULL); + value_t price() const; + value_t& add(const amount_t& amount, + const amount_t * price = NULL, + const amount_t * cost = NULL); value_t value(const std::time_t moment) const { switch (type) { |