From a597b0fb5e00220085ab5d5e1421fd9e41d9080e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 28 Feb 2006 00:53:47 +0000 Subject: Further improvements to lot pricing. --- value.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'value.h') diff --git a/value.h b/value.h index c7aad0e7..05bea81f 100644 --- a/value.h +++ b/value.h @@ -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) { -- cgit v1.2.3